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



##########
File path: 
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
##########
@@ -382,15 +347,16 @@ public boolean generateVMSetupCommand(Long ssAHostId) {
         if (ssAHost.getType() != Host.Type.SecondaryStorageVM) {
             return false;
         }
-        SecondaryStorageVmVO secStorageVm = 
_secStorageVmDao.findByInstanceName(ssAHost.getName());
+        String hostName = ssAHost.getName();
+        SecondaryStorageVmVO secStorageVm = 
_secStorageVmDao.findByInstanceName(hostName);
         if (secStorageVm == null) {
-            s_logger.warn("secondary storage VM " + ssAHost.getName() + " 
doesn't exist");
+            s_logger.warn(String.format("Secondary storage VM [%s] does not 
exist.", hostName));

Review comment:
       I would rename the variable from `hostName` to something that fits 
better on the method context.
   Example: `ssvmName`.

##########
File path: 
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
##########
@@ -402,15 +368,16 @@ public boolean generateVMSetupCommand(Long ssAHostId) {
         String copyPasswd = _configDao.getValue("secstorage.copy.password");
         setupCmd.setCopyPassword(copyPasswd);
         setupCmd.setCopyUserName(TemplateConstants.DEFAULT_HTTP_AUTH_USER);
+
         Answer answer = _agentMgr.easySend(ssAHostId, setupCmd);
         if (answer != null && answer.getResult()) {
             if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Successfully programmed http auth into " + 
secStorageVm.getHostName());
+                s_logger.debug(String.format("Successfully created http auth 
into secondary storage VM [%s].", hostName));

Review comment:
       IMHO `programmed` can be indeed changed to something that best describes 
the logged operation (set the allowed internal sites, username, and password).
   
   `Created` is an option, but I think that `set` fits better.
   
   I would suggest changing from: `Successfully created http auth into 
secondary storage VM [s-123-VM]`
   To: `Successfully set HTTP auth into secondary storage VM [s-123-VM]`




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