This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 281148d  server: Fix stop VM issue on basic zones (#3501)
281148d is described below

commit 281148d5516d3c69a4cd58d2b8b6f9cb35bda4fb
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Tue Jul 23 11:08:52 2019 -0300

    server: Fix stop VM issue on basic zones (#3501)
    
    CloudStack reports an error while stopping/expunging VMs on basic zones
    
    Fixes #3497
---
 .../org/apache/cloudstack/network/topology/BasicNetworkVisitor.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/server/src/main/java/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
 
b/server/src/main/java/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
index 8efb163..d7a94fa 100644
--- 
a/server/src/main/java/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
+++ 
b/server/src/main/java/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
@@ -198,7 +198,9 @@ public class BasicNetworkVisitor extends 
NetworkTopologyVisitor {
         final DeployDestination destination = dhcp.getDestination();
         final boolean remove = dhcp.isRemove();
 
-        if (router.getPodIdToDeployIn().longValue() == 
destination.getPod().getId()) {
+        if (router != null && (remove || (destination != null && 
destination.getPod() != null &&
+                router.getPodIdToDeployIn() != null &&
+                router.getPodIdToDeployIn().longValue() == 
destination.getPod().getId()))) {
             _commandSetupHelper.createDhcpEntryCommand(router, userVM, nicVo, 
remove, commands);
 
             return _networkGeneralHelper.sendCommandsToRouter(router, 
commands);

Reply via email to