GitHub user ProjectMoon opened a pull request: https://github.com/apache/cloudstack/pull/1405
CLOUDSTACK-9280: Allow system VM volumes to be expunged when there are no system VMs remaining This pull request is our proposed fix for https://issues.apache.org/jira/browse/CLOUDSTACK-9280. I added a new special SSVM endpoint that happily accepts any command given to it. This endpoint is used in only a very specific scenario: * The volume's VM is in state destroyed or expunging, but the volume still lingers. * The volume's VM is a system VM (SSVM or console proxy). * There are no secondary storage machines existing in the volume's zone. This necessitated a small change to VolumeObject which allows it to find removed VMs (`findByIdIncludingRemoved`). The main part of the work is in the DefaultEndpointSelector. We would like some thorough review of this PR as well as what tests to create/run. I'm not sure if the scope of this fix will lead to unintentional behavior changes in other scenarios. You can merge this pull request into a Git repository by running: $ git pull https://github.com/greenqloud/cloudstack pr-volume-expunge-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1405.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1405 ---- commit 5de8cb179218be97842993d38365c3902a160328 Author: jeff <j...@greenqloud.com> Date: 2016-01-28T14:23:10Z Add missing license header to ActionEventUtilsTest. commit 7c446f038c9b26dac46b13e0362a76651e561e9d Author: Daan Hoogland <d...@onecht.net> Date: 2016-01-29T09:16:24Z Merge pull request #1382 from greenqloud/pr-fix-license-header Add missing license header to ActionEventUtilsTest.The test class was merged without the license header. This commit fixes that problem. Also note that the license header exists on the master branch only as a result of commit 8a5fc16. The commit seems to be on the master branch and the 4.7 branch only. So there may be some conflicts when forward merging. * pr/1382: Add missing license header to ActionEventUtilsTest. Signed-off-by: Daan Hoogland <d...@onecht.net> commit b5f10b0d9bbf1a6788e82ae86d02e1ba484f238e Author: jeff <j...@greenqloud.com> Date: 2016-02-08T16:30:03Z CLOUDSTACK-9280: System VM volumes can be expunged if no SSVM exists. This commit adds a special SSVM endpoint which simply returns true for all operations sent to it, without actually doing anything. This allows for destroyed volumes of system VMs to be expunged when there are no hosts (and thus no system VMs) remaining to handle the volume destruction. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---