GutoVeronezi commented on a change in pull request #4955:
URL: https://github.com/apache/cloudstack/pull/4955#discussion_r622610849
##########
File path:
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
##########
@@ -1272,22 +1216,20 @@ public boolean finalizeCommandsOnStart(Commands cmds,
VirtualMachineProfile prof
public boolean finalizeStart(VirtualMachineProfile profile, long hostId,
Commands cmds, ReservationContext context) {
CheckSshAnswer answer = (CheckSshAnswer)cmds.getAnswer("checkSsh");
if (!answer.getResult()) {
- s_logger.warn("Unable to ssh to the VM: " + answer.getDetails());
+ s_logger.warn(String.format("Unable to connect via SSH to the VM
[%s] due to [%s] ", profile.toString(), answer.getDetails()));
return false;
}
try {
- //get system ip and create static nat rule for the vm in case of
basic networking with EIP/ELB
Review comment:
Comments were removed because they are nonsense. Most of they only
describe what the next line is doing, e.q.:
```java
//verify if var is true then print it in console
if (var) {
System.out.println("var is true");
}
```
These types of comments do not improve debugging and goes against a clean
code. However, there are comments that explain a bit of the process, but they
could be resolved with an extraction of the code to a method with a
corresponding name, javadoc and etc.
Also, there are `TODO` comments. These requests should be regularized in
issues, not in code.
Comments should be a last resort, not the rule. If we take all the comments
and sort then in a logic way, we could write a book :smile: .
If there are some points you really think that should be kept, let me know,
and then we can discuss if it is important to maintain it; or, maybe, we are
able to get ride of it by executing some minor refactoring.
--
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]