You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/05/28 12:54:00 UTC

[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config

sureshanaparti commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641525386



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4048,7 +4048,10 @@ public UserVmVO doInTransaction(TransactionStatus status) throws InsufficientCap
                         vm.setDetail(VmDetailConstants.FIRMWARE, "efi");
                         s_logger.info("guestOS is OSX : overwrite root disk controller to scsi, use smc and efi");
                     } else {
-                        String controllerSetting = _configDao.getValue("vmware.root.disk.controller");
+                        String controllerSetting = _configDao.getValue(Config.VmwareRootDiskControllerType.key());
+                        if (StringUtils.isEmpty(controllerSetting)) {
+                            controllerSetting = Config.VmwareRootDiskControllerType.getDefaultValue();
+                        }

Review comment:
       > @DaanHoogland wanted to do that but config is used in UserVmManagerImpl and `plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java` so not sure where to place the ConfigKey to access at both places
   
   @shwstppr Agree with @DaanHoogland , better move it to ConfigKey. There are some classes where you can add this config (Eg. StorageManager, can also check Volume / Hypervisor).




-- 
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:
users@infra.apache.org