Skip to content

Commit 60fe5fd

Browse files
Mice XiaMarcus Sorensen
authored andcommitted
CLOUDSTACK-2083 router never comes to running state when addNicToVirtualMachine api is called with network id which is only allocated
1 parent 5142de4 commit 60fe5fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎server/src/com/cloud/network/NetworkManagerImpl.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,8 +3494,8 @@ public NicProfile createNicForVm(Network network, NicProfile requested, Reservat
34943494

34953495
//2) prepare nic
34963496
if (prepare) {
3497-
NetworkVO networkVO = _networksDao.findById(network.getId());
3498-
nic = prepareNic(vmProfile, dest, context, nic.getId(), networkVO);
3497+
Pair<NetworkGuru, NetworkVO> implemented = implementNetwork(nic.getNetworkId(), dest, context);
3498+
nic = prepareNic(vmProfile, dest, context, nic.getId(), implemented.second());
34993499
s_logger.debug("Nic is prepared successfully for vm " + vm + " in network " + network);
35003500
}
35013501

0 commit comments

Comments
 (0)