vladimirpetrov commented on pull request #4493: URL: https://github.com/apache/cloudstack/pull/4493#issuecomment-736330769
I did some testing and here are the results: Test cases: 1. VM destroy and recover VM - created VM with two data disks - destroyed VM (without expunge) along with one data disk - recovered VM, VM successfully came up with other data disk which is not selected to delete 2. VM destroy with expunge - created VM with two data disks - destroyed VM with expunge - VM expunged successfully and two data disks were detached and ready to use for other VMs 3. VM destroy with expunge and leave a data disk not to delete - created VM with two data disks - destroy VM with expunge and select only one data disk to delete - VM expunged successfully and one data disk is deleted and other data disk was detached and ready to use for other VMs 4.14: vSphere TC 1: passed OK TC 2: passed OK TC 3: passed OK 4.14: KVM TC 1: passed OK TC 2: passed OK TC 3: passed OK 4.15: vSphere TC 1: after VM recovering, the remaining data disk is left unattached TC 2: passed OK TC 3: passed OK 4.15: KVM TC 1: passed OK TC 2: passed OK TC 3: passed OK Scenarios: **Scenario A (most likely):** 1. VM is 'deleted' (but not expunged), Disks are not 'deleted' 2. User attaches disk(s) to another VM (why would user keep disks if they weren't planning to use it). 3. VM is restored. **Scenario B:** 1. VM is 'deleted' (but not expunged), Disks are also deleted (but not expunged) 2. Expunge time for disk is less than expunge for VM, so disks get expunged. 3. VM is restored. **Scenario C:** 1. VM is 'deleted' (but not expunged), Disk are not deleted 2. User deletes and expunges disks 3. VM is restored. 4.14: vSphere Scenario A: the disks are not detached during the VM destroying so they cannot be attached to another VM Scenario B: the disks are not detached during the VM destroying so they cannot be deleted Scenario C: the disks are not detached during the VM destroying so they must be detached first and then deleted - no issues there 4.15: vSphere Scenario A: the disk is detached when destroying the VM and is never reattached - so we can reattach it to another VM Scenario B: the disk is detached when destroying the VM and is never reattached - so it's a separate entity now Scenario C: the disk is detached when destroying the VM and is never reattached - so no problem when expunging it and then recovering the VM - it is recovered successfully without the data disk. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
