-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CLOUDSTACK-10004 : On deletion, Vmware volume snapshots are left behind with message 'the snapshot has child, can't delete it on the storage' #2188
Conversation
@niteshsarda Please check travis failure. |
@@ -171,7 +171,10 @@ public DataObject create(DataObject obj, DataStore dataStore) { | |||
ss.setVolumeId(snapshot.getVolumeId()); | |||
SnapshotDataStoreVO snapshotDataStoreVO = snapshotDataStoreDao.findParent(dataStore.getRole(), dataStore.getId(), snapshot.getVolumeId()); | |||
if (snapshotDataStoreVO != null) { | |||
ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId()); |
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.
@niteshsarda findParent method is not giving the correct result. Lets fix that rather than taking a decision later. Also we should not hardcode it as vmware, better to use hypervisorType enum. Differential snapshots are only applicable for XenServer, should use that not vmware.
@SudharmaJain : I have implemented changes as per your suggestion. Please check new fix. |
@niteshsarda we are making multiple queries on the snapshot_store_ref table. I think we can handle this with single query. Also SearchBuilder can be used in place of prepare statement. |
@SudharmaJain : I have removed multiple queries call and also implemented SearchBuilder method to fetch details. Please review latest code. |
@SudharmaJain : Travis failure was intermittent. After doing latest push, all checks are passing. Can you please review latest code. |
LGTM code changes. |
tag:mergeready |
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, minor change might be needed w.r.t. filtering by hypervisor type requiring snapshot dependencies.
sc.setParameters("store_role", role.toString()); | ||
sc.setParameters("state", ObjectInDataStoreStateMachine.State.Ready.name()); | ||
sc.setParameters("store_id", storeId); | ||
sc.setJoinParameters("snapshotVOSearch", "hypervisorType", Hypervisor.HypervisorType.XenServer); |
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.
@niteshsarda Can you confirm if XenServer is the only supported hypervisor with valid parent snapshot ID for a given snapshot ID?
Instead of hardcoding the hypervisor type, could we fetch hypervisor type categorically?
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.
@sateesh-chodapuneedi : Verified that parent snapshot ID is only required in case of XenServer.
Also, as per your suggestion changed the code to fetch hypervisor type categorically.
Please review latest code.
…nd with message 'the snapshot has child, can't delete it on the storage'
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1056 |
@blueorangutan test centos7 vmware-55u3 |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests |
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0 Failed tests:
Skipped tests: Passed test suits: |
Trillian test result (tid-1471)
|
LGTM, failures are known issues. |
Snapshots are not deleted resulting unexpected storage consumption in case of VMware.
Steps to reproduce this issue :
Fix for this issue :
Screenshot of DB before applying fix :

Screenshot of DB after applying fix :
