NetApp / netappdvp

A Docker volume plugin for NetApp storage
96 stars 33 forks source link

Remove parent snapshots for FlexClone volumes #53

Closed synotio closed 7 years ago

synotio commented 7 years ago

This adds support for removing snapshots from the parent volume when removing a flexclone using the volume-clone-get and snapshot-delete ZAPIs.

Right now, if we've previously created a flexclone we're leaving the parent snapshot and not cleaning up after ourselves properly. This pull request solves this problem.

It's currently only implemented for ONTAP NAS but should be trivial to implement for ONTAP SAN. We should probably also check for the snapshot prefix before removal to make sure we're only removing snapshots matching that, but I found no good way of doing this without reimplementing snapshotPrefix() from docker_driver.go into storage_drivers/ontap_nas,go

innergy commented 7 years ago

Thanks a lot for the PR! Apologies for the delay in responding, we've been swamped this week, but we'll review soon.

innergy commented 7 years ago

We ended up going another way with this. With the changes in commit 2201db8 you can specify "splitOnClone", which completely removes any dependencies between the two volumes, including the snapshots. Thanks again for the PR!