[sheepdog] deleting vdi image not deleting snapshots
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Tue Oct 16 06:43:49 CEST 2012
At Mon, 15 Oct 2012 10:43:03 +0200 (CEST),
Alexandre DERUMIER wrote:
>
> Hi,
> I just see that delete an vdi image not deleting snapshots of the image.
> is it normal ?
>
> #collie vdi create image1 100MB
> #collie vdi snapshot image1 -s snap1
>
> # collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a91 2 snap1
> image1 2 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a95 2
>
>
> # collie vdi delete image1
> # collie vdi list
>
> Name Id Size Used Shared Creation time VDI id Copies Tag
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:38 737a91 2 snap1
Currently, we need to specify '-s' option to delete snapshots. I
think deleting snapshots by default is not good since users may want
to keep them for creating other cloned images.
>
> Also, with clone, we can delete the parent image or snapshot, I think we need to add some protections,
> to avoid that
>
> # collie vdi create image1 100MB
> # collie vdi snapshot image1 -s snap1
> # collie vdi clone image1 -s snap1 image2
>
>
> # collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a91 2 snap1
> image1 2 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a96 2
>
>
> # collie vdi delete image1
> # collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2
> s image1 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:40 737a91 2 snap1
>
> # collie vdi delete image1
> # collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> c image2 1 100 MB 0.0 MB 0.0 MB 2012-10-15 10:41 737578 2
It looks like a bug in vdi deletion code. The snapshot should be
deleted with
$ collie vdi delete image1 -s snap1
Thanks,
Kazutaka
More information about the sheepdog
mailing list