sureshanaparti commented on code in PR #10417:
URL: https://github.com/apache/cloudstack/pull/10417#discussion_r1987127809


##########
plugins/maintenance/src/main/java/org/apache/cloudstack/maintenance/ManagementServerMaintenanceManagerImpl.java:
##########
@@ -294,19 +343,21 @@ public ManagementServerMaintenanceResponse 
prepareForShutdown(PrepareForShutdown
             throw new CloudRuntimeException("Management server is not in the 
right state to prepare for shutdown");
         }
 
+        final List<ManagementServerHostVO> 
preparingForMaintenanceOrShutDownMsList = 
msHostDao.listBy(State.PreparingForMaintenance, State.PreparingForShutDown);
+        if 
(CollectionUtils.isNotEmpty(preparingForMaintenanceOrShutDownMsList)) {
+            throw new CloudRuntimeException("Cannot prepare for shutdown, 
there are other management servers preparing for maintenance/shutdown");
+        }

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to