rhtyd commented on a change in pull request #5001:
URL: https://github.com/apache/cloudstack/pull/5001#discussion_r627393486



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2232,7 +2232,7 @@ private void loadVmDetailsInMapForExternalDhcpIp() {
                         VMInstanceVO vmInstance = 
_vmInstanceDao.findById(vmId);
 
                         // only load running vms. For stopped vms get loaded 
on starting
-                        if (vmInstance.getState() == State.Running) {
+                        if (vmInstance != null && vmInstance.getState() == 
State.Running) {

Review comment:
       We shouldn't try to encourage people to do DB hacks and let CloudStack 
fix their mess, but at least let the management server come up.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to