cloudstack
cloudstack copied to clipboard
engine-storage: Set SecretConsumerDetail for VM live migration with storage on shared NFS
Description
Fixes https://github.com/apache/cloudstack/issues/8255
This PR Fixes the issue where live migration of a VM with encrypted volume on shared NFS due to wrongly setup secret key on the destination. Before fix uuid of the secret key was corresponding to the source volume, while actually it should be of the destination volume.
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)
- [ ] build/CI
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
Screenshots (if appropriate):
How Has This Been Tested?
Reproduced the original issue by
- Create a VM with encrypted data volume
- Open the Live VM migrate UI wizard
- Select
Migrate with Storageoption and made sure that the data volume is moved to a different pool. - Start live migrate.
How did you try to break this feature and the system with this change?
Codecov Report
Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
Project coverage is 15.08%. Comparing base (
3f5a77e) to head (487b788). Report is 42 commits behind head on 4.19.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...torage/motion/StorageSystemDataMotionStrategy.java | 0.00% | 1 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## 4.19 #9222 +/- ##
============================================
- Coverage 15.08% 15.08% -0.01%
+ Complexity 11190 11188 -2
============================================
Files 5406 5406
Lines 473210 473211 +1
Branches 61188 59224 -1964
============================================
Hits 71376 71376
- Misses 393887 393888 +1
Partials 7947 7947
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.30% <ø> (ø) |
|
| unittests | 15.80% <0.00%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@abh1sar just a suggestion, you can create a new branch (instread of 4.19)
Removed a condition which was not allowing live migrate for powerflex as @harikrishna-patnala suggested on issue https://github.com/apache/cloudstack/issues/8255
@blueorangutan package
@abh1sar 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 9879
@blueorangutan test
@abh1sar a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[SF] Trillian test result (tid-10427) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 43872 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9222-t10427-kvm-centos7.zip Smoke tests completed. 131 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|
@blueorangutan package
@abh1sar 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 10133
@blueorangutan test
@abh1sar a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[SF] Trillian test result (tid-10632) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 46423 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9222-t10632-kvm-centos7.zip Smoke tests completed. 131 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|
[SF] Trillian Build Failed (tid-10656)
@blueorangutan package
@borisstoyanov 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 10189
@blueorangutan package
@borisstoyanov 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.
@abh1sar I'm facing a strange issue with my env (rebuild it so it was not an accident). when I try to deploy I get the following error
2024-06-28 11:52:07,147 ERROR [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-11:ctx-d8307cc4 job-49/job-50 ctx-0e92140e) (logid:1b4ac1f6) Unable to create volume [{"name":"ROOT-9","uuid":"bbbd5b79-9e55-48ca-b2a2-ee933f07e624"}] due to [No remote endpoint to send command, check if host or ssvm is down?]. 2024-06-28 11:52:07,147 WARN [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-11:ctx-d8307cc4 job-49/job-50 ctx-0e92140e) (logid:1b4ac1f6) Unable to contact resource. com.cloud.exception.StorageUnavailableException: Resource [StoragePool:1] is unreachable: Unable to create volume [{"name":"ROOT-9","uuid":"bbbd5b79-9e55-48ca-b2a2-ee933f07e624"}] due to [No remote endpoint to send command, check if host or ssvm is down?]. at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.recreateVolume(VolumeOrchestrator.java:1817) at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.prepare(VolumeOrchestrator.java:1930)but both host and ssvm are up and running, any idea?
Don't see how this change can affect creation of root volumes. @borisstoyanov
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10196
@borisstoyanov I have merged with the latest changes and built packages. Can you please try once more.
@blueorangutan package
@abh1sar 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 10729
@borisstoyanov @sureshanaparti are your concerns met?
@blueorangutan test
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests