DaanHoogland commented on code in PR #6947:
URL: https://github.com/apache/cloudstack/pull/6947#discussion_r1080955098
##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -5398,11 +5403,19 @@ public Pair<UserVmVO, Map<VirtualMachineProfile.Param,
Object>> startVirtualMach
String password = "saved_password";
if (template.isEnablePassword()) {
if (vm.getDetail("password") != null) {
+ s_logger.debug(String.format("Decrypting VM [%s] current
password.", vm));
password =
DBEncryptionUtil.decrypt(vm.getDetail("password"));
+ } else if
(additionalParams.containsKey(VirtualMachineProfile.Param.VmPassword)) {
Review Comment:
good catch @RodrigoDLopez , but I think the null check must go upstream a
bit as there is another use of the `additionalParams` below.
I think it pays (extra) to factor this bit of code out into a new method
@stephankruggg
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]