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 committed by Marcus Sorensen
parent 5142de4488
commit 60fe5fd923
1 changed files with 2 additions and 2 deletions

View File

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