GabrielBrascher commented on a change in pull request #4228:
URL: https://github.com/apache/cloudstack/pull/4228#discussion_r468348299



##########
File path: 
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -410,6 +410,10 @@
     public final static ConfigKey<Long> IOPS_MAX_WRITE_LENGTH = new 
ConfigKey<Long>(Long.class, "vm.disk.iops.maximum.write.length", "Advanced", 
"0",
             "Maximum IOPS write burst duration (seconds). If '0' (zero) then 
does not check for maximum burst length.", true, ConfigKey.Scope.Global, null);
 
+    public static final ConfigKey<Boolean> AddHostOnServiceRestart = new 
ConfigKey<Boolean>(Boolean.class, "add.host.on.service.restart", "Advanced", 
"true",

Review comment:
       Considering that this is defined as a `static final`, I would recommend 
keeping the code convention such as described on [Oracle Java Naming 
Conventions](https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html).
   
   In this case `AddHostOnServiceRestart` should be changed to something as 
`ADD_HOST_ON_SERVICE_RESTART`.

##########
File path: agent/src/main/java/com/cloud/agent/Agent.java
##########
@@ -419,6 +419,15 @@ protected void cancelTasks() {
         }
     }
 
+    protected void cleanupAgentZoneProperties() {
+        // Unset zone, cluster and pod values so that host is not added back
+        // when service is restarted. This will be set to proper values
+        // when host is added back

Review comment:
       These commented lines could be a nice Javadoc for the method; what do 
you think of moving them to a Javadoc block?




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