server: fix volume detach operation when no vm host#7526
server: fix volume detach operation when no vm host#7526DaanHoogland merged 3 commits intoapache:4.18from
Conversation
CloudStack may not keep the VM associated to any host when there is offline migration across cluster or pod. In such cases, CloudStack should be able to send the AttachCommand or DetachCommand to any available host in the current VM cluster. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #7526 +/- ##
============================================
+ Coverage 12.93% 12.96% +0.02%
- Complexity 8941 8992 +51
============================================
Files 2716 2728 +12
Lines 256108 256640 +532
Branches 39939 40021 +82
============================================
+ Hits 33127 33266 +139
- Misses 218822 219193 +371
- Partials 4159 4181 +22
... and 40 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan package |
|
@shwstppr a 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: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6070 |
|
@blueorangutan package |
|
@rohityadavcloud a [LL] Jenkins job has been kicked to build packages. It will be bundled with SystemVM template(s). I'll keep you posted as I make progress. |
|
cc @andrijapanicsb @rajujith @alexandremattioli @NuxRo have we enabled London lab? |
|
Packaging result [LL]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6032 |
|
@blueorangutan test matrix |
|
@shwstppr a [LL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-6513) |
|
Trillian test result (tid-6515)
|
|
Trillian test result (tid-6514)
|
|
@blueorangutan package |
|
@weizhouapache a [LL] 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 [LL]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6043 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6097 |
|
@blueorangutan test matrix |
|
@shwstppr a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-6546)
|
|
Trillian test result (tid-6548)
|
|
Trillian test result (tid-6547)
|
|
tested according to #7525 (comment) and verified no extra disks attached to the VM. |
kiranchavala
left a comment
There was a problem hiding this comment.
The following scenario is failing
-
Deploy an environment with 2 clusters (Cluster A , Cluster B) in a single pod
-
Deploy a vm with a data disk in cluster A
-
Stop the vm from CS, the host id will be set to null
-
Migrate the vm to cluster B via Vcenter
- Try to detach the data volume to Vm >> failure
It works fine if the migration of the vm is done by CS
-
Deploy a environment with 2 clusters (Cluster A , Cluster B) in a single pod
-
Deploy a vm with a data disk in cluster A
-
Stop the vm in CS
-
Migrate the vm to cluster B via CS
-
Try to detach data volume to Vm >> Success
|
@shwstppr is this something we can/must support?
|
|
@DaanHoogland to support some extensive changes would be required in the VMware plugin. And even then I don't think we can cover all cases of such out-of-band operations. So, in my opinion, this can be an improvement request but I don't think there is a major use-case for this. |
|
@kiranchavala , if you feel this scenario should be supported as well, please open a new issue. I think it is out of scope for this fix and a stretch to ask in general; If people do things to cloud resources out of band we cannot guarantee recovery in all circumstances. |
|
Thanks @DaanHoogland I agree with @shwstppr view that we cannot cover all cases of out-of-band operations |
Description
Fixes #7525
CloudStack may not keep the VM associated to any host when there is offline migration across cluster or pod. In such cases, CloudStack should be able to send the AttachCommand or DetachCommand to any available host in the current VM cluster.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?