-
Notifications
You must be signed in to change notification settings - Fork 1.3k
storage: fix vmware volume cleanup failure #7312
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
Conversation
Fixes apache#7311 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
rohityadavcloud
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.
Left some questions/remarks. Overall logic seems better than earlier.
|
|
||
| protected Host getVmwareHostFromVolumeToDelete(VolumeInfo volume) { | ||
| VirtualMachine vm = volume.getAttachedVM(); | ||
| if (vm == null) { |
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.
If the volume isn't attached to a VM - would it be removed by GC (if not by this code) then?
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.
Yes then the calling method code tries to find a host based on the storage at line 476 https://github.com/apache/cloudstack/pull/7312/files#diff-45668a1459e79e7705bb54a8f6e09d972a12ffe972b06b61468e06f4f8ce2c3dR476
| if (hostId == null) { | ||
| return null; | ||
| } | ||
| HostVO host = hostDao.findById(hostId); |
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.
question - should we find host which has access to the storage pool (not always the vm's host ID or the last host ID?) to be responsible for deleting the volume?
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.
It will try to find the host based on the storage pool of the volume at line 476, https://github.com/apache/cloudstack/pull/7312/files#diff-45668a1459e79e7705bb54a8f6e09d972a12ffe972b06b61468e06f4f8ce2c3dR476
An option could be to completely remove the logic to try and find a host based on volume VM
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
Tested the fix with a 4.15.2.0 patch. DeleteCommand send to correct host in the source cluster @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 5682 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-6265)
|
rohityadavcloud
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 - this would need manual testing and regression testing for various permutations/combinations around the change.
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.
(wrong PR, comment removed)
|
@vladimirpetrov probably update the wrong PR. Re-requesting your review |
|
@shwstppr is this PR still relevant for 4.17 or can be closed? |
vladimirpetrov
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 based on manual testing.
|
@nvazquez cc @vladimirpetrov yes, we can close this. As per my update on this tagged issue, the problem is fixed with #5575. ACS marks volume as detached once migration is complete and then deletion of source volume file is handled by an appropriate host. |
Description
Fixes #7311
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?