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 07:36:55 UTC
[GitHub] [cloudstack] shwstppr opened a new pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
shwstppr opened a new pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045
### Description
When global config - vmware.root.disk.controller is set to empty and template is registered with deployasis, server will throw NPE while deploying a VM. This change fixes the problem by using default value of the config in this case.
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ********************************************************************************* -->
<!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ********************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
By deploying VM with a deployasis (read settings from OVA) template.
**Without change:**
```
2021-05-28 06:41:53,503 DEBUG [c.c.a.ApiServlet] (qtp1233705144-21:ctx-18f24cbd) (logid:a0001979) ===START=== 172.16.250.9 -- GET zoneid=251398d0-707d-4e5a-9298-2a97a1eff534&templateid=888f0a52-e34b-4193-8cfb-4b7d3ce42753&startvm=true&serviceofferingid=8b28cbe8-5d57-4c3d-85d9-d92b67af13a3&affinitygroupids=&iptonetworklist[0].networkid=f3185526-afce-462d-ba75-b2ac439b9de9&name=t202&displayname=t202&command=deployVirtualMachine&response=json
2021-05-28 06:41:53,511 DEBUG [c.c.a.ApiServer] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) CIDRs from which account 'Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin]' is allowed to perform API calls: 0.0.0.0/0,::/0
2021-05-28 06:41:53,522 DEBUG [c.c.u.AccountManagerImpl] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) Access granted to Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin] to org.apache.cloudstack.quota.vo.ServiceOfferingVO$$EnhancerByCGLIB$$633a68df@124467e8 by AffinityGroupAccessChecker
2021-05-28 06:41:53,522 DEBUG [c.c.u.AccountManagerImpl] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) Access granted to Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin] to null by AffinityGroupAccessChecker
2021-05-28 06:41:53,530 DEBUG [c.c.n.NetworkModelImpl] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) Service SecurityGroup is not supported in the network id=213
2021-05-28 06:41:53,537 DEBUG [c.c.u.d.T.Transaction] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) Rolling back the transaction: Time = 2 Name = qtp1233705144-21; called by -TransactionLegacy.rollback:888-TransactionLegacy.removeUpTo:831-TransactionLegacy.close:655-Transaction.execute:38-UserVmManagerImpl.commitUserVm:3993-UserVmManagerImpl.commitUserVm:4180-UserVmManagerImpl.createVirtualMachine:3888-UserVmManagerImpl.createAdvancedVirtualMachine:3414-UserVmManagerImpl.createVirtualMachine:5350-NativeMethodAccessorImpl.invoke0:-2-NativeMethodAccessorImpl.invoke:62-DelegatingMethodAccessorImpl.invoke:43
2021-05-28 06:41:53,538 ERROR [c.c.a.ApiServer] (qtp1233705144-21:ctx-18f24cbd ctx-ed3119fc) (logid:a0001979) unhandled exception executing api command: [Ljava.lang.String;@62805107
java.lang.NullPointerException
at com.cloud.vm.UserVmManagerImpl$4.doInTransaction(UserVmManagerImpl.java:4057)
at com.cloud.vm.UserVmManagerImpl$4.doInTransaction(UserVmManagerImpl.java:3993)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at com.cloud.vm.UserVmManagerImpl.commitUserVm(UserVmManagerImpl.java:3993)
at com.cloud.vm.UserVmManagerImpl.commitUserVm(UserVmManagerImpl.java:4180)
at com.cloud.vm.UserVmManagerImpl.createVirtualMachine(UserVmManagerImpl.java:3888)
at com.cloud.vm.UserVmManagerImpl.createAdvancedVirtualMachine(UserVmManagerImpl.java:3414)
at com.cloud.vm.UserVmManagerImpl.createVirtualMachine(UserVmManagerImpl.java:5350)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
```
**With change:**
```
2021-05-28 07:33:00,190 DEBUG [c.c.a.ApiServlet] (qtp1233705144-22:ctx-596f958a) (logid:036c2e85) ===START=== 172.16.250.9 -- GET zoneid=251398d0-707d-4e5a-9298-2a97a1eff534&templateid=888f0a52-e34b-4193-8cfb-4b7d3ce42753&startvm=true&serviceofferingid=8b28cbe8-5d57-4c3d-85d9-d92b67af13a3&affinitygroupids=&iptonetworklist[0].networkid=f3185526-afce-462d-ba75-b2ac439b9de9&name=t204&displayname=t204&command=deployVirtualMachine&response=json
2021-05-28 07:33:00,195 DEBUG [c.c.a.ApiServer] (qtp1233705144-22:ctx-596f958a ctx-70050728) (logid:036c2e85) CIDRs from which account 'Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin]' is allowed to perform API calls: 0.0.0.0/0,::/0
2021-05-28 07:33:00,203 DEBUG [c.c.u.AccountManagerImpl] (qtp1233705144-22:ctx-596f958a ctx-70050728) (logid:036c2e85) Access granted to Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin] to org.apache.cloudstack.quota.vo.ServiceOfferingVO$$EnhancerByCGLIB$$633a68df@19466499 by AffinityGroupAccessChecker
2021-05-28 07:33:00,204 DEBUG [c.c.u.AccountManagerImpl] (qtp1233705144-22:ctx-596f958a ctx-70050728) (logid:036c2e85) Access granted to Acct[a0d53995-92b4-11eb-9b07-1e0053000169-admin] to null by AffinityGroupAccessChecker
2021-05-28 07:33:00,210 DEBUG [c.c.n.NetworkModelImpl] (qtp1233705144-22:ctx-596f958a ctx-70050728) (logid:036c2e85) Service SecurityGroup is not supported in the network id=213
2021-05-28 07:33:00,224 DEBUG [c.c.v.UserVmManagerImpl] (qtp1233705144-22:ctx-596f958a ctx-70050728) (logid:036c2e85) Allocating in the DB for VM
...
2021-05-28 07:33:15,962 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-3:ctx-b4f0832b job-440 ctx-84dfc40e) (logid:21a80315) Complete async job-440, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"43767842-2833-4d61-9487-1f5c4615af8a","name":"t204","displayname":"t204","account":"admin","userid":"a0d68685-92b4-11eb-9b07-1e0053000169","username":"admin","domainid":"89597c05-92b4-11eb-9b07-1e0053000169","domain":"ROOT","created":"2021-05-28T07:33:00+0000","state":"Running","haenable":"false","zoneid":"251398d0-707d-4e5a-9298-2a97a1eff534","zonename":"pr4758-t323-vmware-65u2","hostid":"4d627038-eb66-4a93-891a-b937572855d5","hostname":"10.0.33.186","templateid":"888f0a52-e34b-4193-8cfb-4b7d3ce42753","templatename":"mac","templatedisplaytext":"mac","passwordenabled":"false","serviceofferingid":"8b28cbe8-5d57-4c3d-85d9-d92b67af13a3","serviceofferingname":"Small Instance","cpunumber":"1","cpuspeed":"500","mem
ory":"512","guestosid":"89703585-92b4-11eb-9b07-1e0053000169","rootdeviceid":"0","rootdevicetype":"ROOT","securitygroup":[],"nic":[{"id":"8d7dd20c-ca90-4021-912f-393064f2615a","networkid":"f3185526-afce-462d-ba75-b2ac439b9de9","networkname":"iso1","netmask":"255.255.255.0","gateway":"10.1.1.1","ipaddress":"10.1.1.32","isolationuri":"vlan://1489","broadcasturi":"vlan://1489","traffictype":"Guest","type":"Isolated","isdefault":"true","macaddress":"02:00:49:4f:00:04","secondaryip":[],"extradhcpoption":[]}],"hypervisor":"VMware","instancename":"i-2-45-VM","details":{"dataDiskController":"osdefault","memoryOvercommitRatio":"1.0","cpuOvercommitRatio":"2.0","rootDiskController":"lsilogic"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"89703585-92b4-11eb-9b07-1e0053000169","osdisplayname":"Other Linux (64-bit)","tags":[],"jobid":"21a80315-8143-4c12-8fd3-9d7b109a27cb","jobstatus":"0"}
```
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850499905
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests
--
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
[GitHub] [cloudstack] shwstppr commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850216770
@blueorangutan package
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850746902
<b>Trillian test result (tid-783)</b>
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35357 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5045-t783-vmware-67u3.zip
Smoke tests completed. 87 look OK, 0 have error(s)
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850372949
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
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
[GitHub] [cloudstack] shwstppr commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850372721
@blueorangutan package
--
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
[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [cloudstack] rhtyd commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850499312
@blueorangutan test centos7 vmware-67u3
--
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
[GitHub] [cloudstack] shwstppr commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r642303555
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4048,7 +4048,8 @@ 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 = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()),
+ Config.VmwareRootDiskControllerType.getDefaultValue());
Review comment:
@rhtyd Didn't get you. Code change is to use the default value of the config when the value set against it is empty.
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850217287
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
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
[GitHub] [cloudstack] rhtyd commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r642332539
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4048,7 +4048,8 @@ 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 = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()),
+ Config.VmwareRootDiskControllerType.getDefaultValue());
Review comment:
Nevermind.
--
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
[GitHub] [cloudstack] rhtyd commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641960929
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4048,7 +4048,8 @@ 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 = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()),
+ Config.VmwareRootDiskControllerType.getDefaultValue());
Review comment:
Is it the config key default value or global setting value?
--
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
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641431952
##########
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:
ok, i see. that is another type of issue than; a plugin specific setting used in generic code. Don't see this as a minus 1 by the way.
--
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
[GitHub] [cloudstack] rhtyd commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850341446
@blueorangutan test centos7 vmware-67u3
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850239933
Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 107
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850687539
<b>Trillian test result (tid-778)</b>
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35005 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5045-t778-vmware-67u3.zip
Smoke tests completed. 87 look OK, 0 have error(s)
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
[GitHub] [cloudstack] rhtyd merged pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045
--
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
[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641487890
##########
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:
@shwstppr can we use this instead?
```suggestion
String controllerSetting = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()),
Config.VmwareRootDiskControllerType.getDefaultValue());
```
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850341689
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests
--
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
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641374830
##########
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:
converting this setting to modern ConfigKey<> would be more failsafe and concise.
--
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
[GitHub] [cloudstack] shwstppr commented on a change in pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#discussion_r641428737
##########
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
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #5045: server: fixes NPE on empty vmware.root.disk.controller config
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5045:
URL: https://github.com/apache/cloudstack/pull/5045#issuecomment-850386383
Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 112
--
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