-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix NPE when sending copy command to least busy SSVM #9125
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
Fix NPE when sending copy command to least busy SSVM #9125
Conversation
|
@blueorangutan package |
|
@winterhazel 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9125 +/- ##
===========================================
Coverage 15.55% 15.55%
Complexity 12011 12011
===========================================
Files 5500 5500
Lines 481889 481889
Branches 62240 58646 -3594
===========================================
+ Hits 74966 74970 +4
+ Misses 398637 398633 -4
Partials 8286 8286
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9700 |
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, but i think we must consider moving this to the DAO layer.. maybe not in the scope of this pr and we'll need a standard way/place to deal with joins from the code as opposed to views.
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-10297)
|
weizhouapache
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
Not tested
borisstoyanov
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.
LGTM, tested it, on the second try with new SSVM running I did not had the NPE with a record still in the DB. @DaanHoogland I think your comment is still standing, assigning to you and removing the needs-testing label
|
@winterhazel , do you think my comment is worth your effort now? If not I'll add a suggestion for a comment for later work. |
engine/storage/src/main/java/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
Outdated
Show resolved
Hide resolved
I'll move it to the DAO layer in this PR already ;) |
|
@blueorangutan package |
|
@winterhazel 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9870 |
|
@DaanHoogland, can we run the CI one last time here? |
|
Yes @BryanMLima but our lab is reserved for 4.19 work this week. main will have to wait. |
|
@blueorangutan package |
|
@JoaoJandre 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10453 |
|
@DaanHoogland could we run the CI here? |
|
@blueorangutan package |
|
@DaanHoogland 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 10615 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-11062) |
|
@DaanHoogland could we run the CI again? |
|
@blueorangutan LLtest |
|
@DaanHoogland a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[LL]Trillian test result (tid-6967)
|
|
@blueorangutan package |
|
@DaanHoogland 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 10775 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11172)
|
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11203)
|
Description
In order to copy an object from a secondary storage to another, the MS sends a copy command to the least busy SSVM; however, removed SSVMs are considered when listing the SSVMs ordered by the quantity of commands being executed. This way, if there are commands that have not finished properly in a removed SSVM, a NPE occurs when sending the copy command if the "least busy" SSVM has been removed.
This PRs fixes the NPE.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
cmd_exec_logtable had one entry for a command sent to the SSVM;cmd_exec_logstill had one entry for the removed SSVM;Before the changes, step 6 would result in a NPE, as the removed SSVM was sometimes chosen as the least busy SSVM.
After applying the changes, step 6 does not throw a NPE, as the removed SSVM is not considered when listing the SSVMs anymore.