sureshanaparti commented on a change in pull request #4363:
URL: https://github.com/apache/cloudstack/pull/4363#discussion_r503804331
##########
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 May be some confusion here. My point is, use the config value
specified at the scope defined in the config parameter, else update the config
scope accordingly.
The config "SET_HOST_DOWN_TO_MAINTENANCE" defined above uses Zone Scope. So,
In order to pick the Zone specific value of that config, you have to use
"_valueIn(<zoneId>)_", not _value()_ (this picks the global config value). If
your use case is to set the config at Cloud level, then change Scope to Global.
----------------------------------------------------------------
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]