CLOUDSTACK-2083 router never comes to running state when addNicToVirtualMachine api is called with network id which is only allocated

This commit is contained in:
Mice Xia 2013-04-19 10:45:43 +08:00
parent f8d4a23343
commit 4fd921269b

View File

@ -3636,8 +3636,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
//2) prepare nic //2) prepare nic
if (prepare) { if (prepare) {
NetworkVO networkVO = _networksDao.findById(network.getId()); Pair<NetworkGuru, NetworkVO> implemented = implementNetwork(nic.getNetworkId(), dest, context);
nic = prepareNic(vmProfile, dest, context, nic.getId(), networkVO); nic = prepareNic(vmProfile, dest, context, nic.getId(), implemented.second());
s_logger.debug("Nic is prepared successfully for vm " + vm + " in network " + network); s_logger.debug("Nic is prepared successfully for vm " + vm + " in network " + network);
} }