Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade: consider multiple hypervisors and secondary storages
This fixes an issue during upgrade in edge case. Steps to reproduce the issue - deploy an env with ACS 4.18 - the env has multiple hypervisors: KVM and VMware - the env has multiple secondary storages: sec1 and sec2 - register the new 4.19.1 systemvm template for VMware (systemvm-vmware-4.19.1), but mistakely as a private template. - the systemvm template is downloaded to sec2 (not sec1). If it is downloaded to sec1, remove it and re-register the template. - backup the cloudstack databases by `mysqldump -R cloud` and `mysqldump -R cloud_usage` - install ACS 4.19.1.2 and start mgmt server Without this PR, got an NPE during mgmt server start ``` 2024-10-29 12:46:53,904 ERROR [c.c.u.SystemVmTemplateRegistration] (main:null) (logid:) Failed to register template for hypervisor: VMware java.lang.NullPointerException at com.cloud.upgrade.SystemVmTemplateRegistration.updateTemplateDetails(SystemVmTemplateRegistration.java:519) at com.cloud.upgrade.SystemVmTemplateRegistration.performTemplateRegistrationOperations(SystemVmTemplateRegistration.java:640) at com.cloud.upgrade.SystemVmTemplateRegistration.registerTemplate(SystemVmTemplateRegistration.java:650) at com.cloud.upgrade.SystemVmTemplateRegistration$4.doInTransactionWithoutResult(SystemVmTemplateRegistration.java:789) at com.cloud.utils.db.TransactionCallbackNoReturn.doInTransaction(TransactionCallbackNoReturn.java:25) ```
- Loading branch information