Skip to content

Commit 281148d

Browse files
nvazquezyadvr
authored andcommitted
server: Fix stop VM issue on basic zones (#3501)
CloudStack reports an error while stopping/expunging VMs on basic zones Fixes #3497
1 parent 5690cd6 commit 281148d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/src/main/java/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ public boolean visit(final DhcpEntryRules dhcp) throws ResourceUnavailableExcept
198198
final DeployDestination destination = dhcp.getDestination();
199199
final boolean remove = dhcp.isRemove();
200200

201-
if (router.getPodIdToDeployIn().longValue() == destination.getPod().getId()) {
201+
if (router != null && (remove || (destination != null && destination.getPod() != null &&
202+
router.getPodIdToDeployIn() != null &&
203+
router.getPodIdToDeployIn().longValue() == destination.getPod().getId()))) {
202204
_commandSetupHelper.createDhcpEntryCommand(router, userVM, nicVo, remove, commands);
203205

204206
return _networkGeneralHelper.sendCommandsToRouter(router, commands);

0 commit comments

Comments
 (0)