-
Notifications
You must be signed in to change notification settings - Fork 1.2k
server: allow destroy/recover volumes which are attached to removed vms #5364
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
server: allow destroy/recover volumes which are attached to removed vms #5364
Conversation
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 - did not test it
@blueorangutan package |
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 999 |
@blueorangutan test |
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian Build Failed (tid-1765) |
@blueorangutan test |
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-1769)
|
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.
After following the steps and destroying a VM, the Volume is in the destroy state
It then can be recovered to a DATADISK or deleted once the agents are brought up
A suggestion - If a root volume is recovered and converted to datadisk, does it make sense to change the name if it contains ROOT
?
thanks for testing @davidjumani I agree with changing the volume name which sometimes make users confused. Do you have suggestion on the new volume name ? |
@weizhouapache Perhaps just 'DISK' or the VM-NAME-DISK if possible |
if vm has datadisk as well, it will be a bit confused (VM-NAME-DISK vs VM-NAME-DATADISK). we can discuss in another thread, this is not what this pr need to fix I think. |
Description
This PR fixes #5347
Steps to reproduce the issue on KVM
(1) create a vm, and stop it
(2) stop all cloudstack-agent
(3) expunge the vm. vm is removed, but root volume is in 'Destroy' state.
(4) destroy/expunge the volume, fails.
(5) recover the volume, the volume is restored to ROOT disk and attached the removed vm, therefore we cannot attach to any other vms.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?