Skip to content

Commit 4fd9212

Browse files
author
Mice Xia
committed
CLOUDSTACK-2083 router never comes to running state when addNicToVirtualMachine api is called with network id which is only allocated
1 parent f8d4a23 commit 4fd9212

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
@@ -3636,8 +3636,8 @@ public NicProfile createNicForVm(Network network, NicProfile requested, Reservat
36363636

36373637
//2) prepare nic
36383638
if (prepare) {
3639-
NetworkVO networkVO = _networksDao.findById(network.getId());
3640-
nic = prepareNic(vmProfile, dest, context, nic.getId(), networkVO);
3639+
Pair<NetworkGuru, NetworkVO> implemented = implementNetwork(nic.getNetworkId(), dest, context);
3640+
nic = prepareNic(vmProfile, dest, context, nic.getId(), implemented.second());
36413641
s_logger.debug("Nic is prepared successfully for vm " + vm + " in network " + network);
36423642
}
36433643

0 commit comments

Comments
 (0)