You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/13 06:35:10 UTC

[GitHub] [cloudstack] ravening commented on a change in pull request #4363: Ability to put a server in Down state to maintenance

ravening commented on a change in pull request #4363:
URL: https://github.com/apache/cloudstack/pull/4363#discussion_r503698395



##########
File path: server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
##########
@@ -1302,6 +1305,17 @@ public Host maintain(final PrepareForMaintenanceCmd cmd) {
             throw new CloudRuntimeException("Host is already in state " + host.getResourceState() + ". Cannot recall for maintenance until resolved.");
         }
 
+        if (SET_HOST_DOWN_TO_MAINTENANCE.value() && (host.getStatus() == Status.Down)) {

Review comment:
       > @ravening consider the value in zone, as the config scope is specified as Zone.
   > 
   > 
   > 
   > ```suggestion
   > 
   >         if (SET_HOST_DOWN_TO_MAINTENANCE.valueIn(host.getDataCenterId()) && (host.getStatus() == Status.Down)) {
   > 
   > ```
   
   @sureshanaparti i don't think we need that because the host can exist only in one zone at any time but I can change the setting to zone scope instead of global scope




----------------------------------------------------------------
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:
users@infra.apache.org