-
Notifications
You must be signed in to change notification settings - Fork 1.2k
upgrade: consider multiple hypervisors and secondary storages #10046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade: consider multiple hypervisors and secondary storages #10046
Conversation
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)
```
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10046 +/- ##
============================================
+ Coverage 15.10% 15.13% +0.02%
- Complexity 11220 11272 +52
============================================
Files 5404 5408 +4
Lines 473460 473960 +500
Branches 57728 57811 +83
============================================
+ Hits 71525 71723 +198
- Misses 393941 394219 +278
- Partials 7994 8018 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11723 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11725 |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12013 |
|
@weizhouapache with or without this PR I get a result like this: |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@DaanHoogland
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12017 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12065)
|
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good and tested upgrades to 4.19 head (npe) and to this PR (good upgrade)
used two hypervisortypes - vmware and xcpng
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM - haven’t tested it though. It would also worth verifying upgrades on single hypervisor and single secondary storage for any regressions
|
[SF] Trillian test result (tid-12087)
|
I have tested that, but 3rd party testing would be good. err: I was the 3rd party already ;) To be clear, I tested with xcpng+vmware and vmware+kvm and with vmware alone. All of them passed. |


This fixes an issue during upgrade in edge case.
Steps to reproduce the issue
Without this PR, got an NPE during mgmt server start
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?