← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 855663] Re: euca-delete-bundle doesn't delete the images

 

** Changed in: nova
       Status: Confirmed => Opinion

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/855663

Title:
  euca-delete-bundle doesn't delete the images

Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  glance           2011.3~rc~20110908.r1005-0ubuntu1
  nova-objectstore 2011.3~rc~20110909.r1155-0ubuntu1
  swift            1.4.3-0ubuntu1

  I am using nova-objectstore + glance + swift with the EC2 api.

  When running 'euca-delete-images' to delete an image that I have
  uploaded, only the nova-objectstore bucket is removed and the image is
  not removed from glance/swift.

  I expect that the images that I delete will be deleted from
  glance/swift.

  Previously I was using nova-objectstore + glance + filesystem store +
  EC2 api and I don't believe that this was an issue.

  = Steps to reproduce  =

  1.  Download an image tarball

  agy@remote:~$ wget http://uec-images.ubuntu.com/oneiric/current
  /oneiric-server-cloudimg-amd64.tar.gz

  2. Publish the tarball

  agy@remote:~$ $ cloud-publish-tarball oneiric-server-cloudimg-amd64.tar.gz agytestbucket amd64
  Wed Sep 21 15:55:48 BST 2011: ====== extracting image ======
  Warning: no ramdisk found, assuming '--ramdisk none'
  kernel : oneiric-server-cloudimg-amd64-vmlinuz-virtual
  ramdisk: none
  image  : oneiric-server-cloudimg-amd64.img
  Wed Sep 21 15:56:06 BST 2011: ====== bundle/upload kernel ======
  Wed Sep 21 15:56:08 BST 2011: ====== bundle/upload image ======
  Wed Sep 21 15:57:42 BST 2011: ====== done ======
  emi="ami-00000096"; eri="none"; eki="aki-00000095";

  3. Check on the server's S3 bucket - looks correct

  agy@nova:~$ ls -la /var/lib/nova/buckets/agytestbucket/ | wc -l
  25

  4. Check glance/swift - looks correct

  agy@nova:~$ glance show $((0x96))
  URI: http://0.0.0.0/images/150
  Id: 150
  Public: No
  Name: None
  Status: active
  Size: 0
  Location: swift+https://glance:glance:XXXXXXXXXXXXXXXX@127.0.0.1/auth/v1.0//glance/150
  Disk format: ami
  Container format: ami
  Property 'kernel_id': 149
  Property 'image_location': agytestbucket/oneiric-server-cloudimg-amd64.img.manifest.xml
  Property 'image_state': available
  Property 'project_id': canonistack_project
  Property 'architecture': x86_64

  5. For both images - correct for both images (apart from LP#845788)

  agy@nova:~$ glance show $((0x95))
  URI: http://0.0.0.0/images/149
  Id: 149
  Public: No
  Name: None
  Status: active
  Size: 0
  Location: swift+https://glance:glance:XXXXXXXXXXXXXXXX@127.0.0.1/auth/v1.0//glance/149
  Disk format: aki
  Container format: aki
  Property 'image_location': agytestbucket/oneiric-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml
  Property 'image_state': available
  Property 'project_id': canonistack_project
  Property 'architecture': x86_64

  6. Check what euca-describe-images says - looks correct

  agy@remote:~$ euca-describe-images ami-00000096 aki-00000095
  IMAGE   ami-00000096    agytestbucket/oneiric-server-cloudimg-amd64.img.manifest.xml            available       private         x86_64 machine  aki-00000095            instance-store
  IMAGE   aki-00000095    agytestbucket/oneiric-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml                available       privatex86_64   kernel                  instance-store

  7. Delete the bucket and the contents

  agy@remote:~$ euca-delete-bundle -b agytestbucket --clear
  Neither manifestpath nor prefix was specified.
  All manifest data in bucket will be deleted.

  8. Check that the S3 bucket is missing - all good so far
  agy@nova:~$ ls -la /var/lib/nova/buckets/agytestbucket/ | wc -l
  ls: cannot access /var/lib/nova/buckets/agytestbucket/: No such file or directory
  0

  9. Check glance/swift - the image is still there

  agy@nova:~$ glance show $((0x95))
  URI: http://0.0.0.0/images/149
  Id: 149
  Public: No
  Name: None
  Status: active
  Size: 0
  Location: swift+https://glance:glance:XXXXXXXXXXXXXXXX@127.0.0.1/auth/v1.0//glance/149
  Disk format: aki
  Container format: aki
  Property 'image_location': agytestbucket/oneiric-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml
  Property 'image_state': available
  Property 'project_id': canonistack_project
  Property 'architecture': x86_64

  10. For both images - this one too

  agy@nova:~$ glance show $((0x96))
  URI: http://0.0.0.0/images/150
  Id: 150
  Public: No
  Name: None
  Status: active
  Size: 0
  Location: swift+https://glance:glance:XXXXXXXXXXXXXXXX@127.0.0.1/auth/v1.0//glance/150
  Disk format: ami
  Container format: ami
  Property 'kernel_id': 149
  Property 'image_location': agytestbucket/oneiric-server-cloudimg-amd64.img.manifest.xml
  Property 'image_state': available
  Property 'project_id': canonistack_project
  Property 'architecture': x86_64

  11. Check what euca-describe-images says - yup, still there

  agy@remote:~$ euca-describe-images ami-00000096 aki-00000095
  IMAGE   ami-00000096    agytestbucket/oneiric-server-cloudimg-amd64.img.manifest.xml            available       private         x86_64 machine  aki-00000095            instance-store
  IMAGE   aki-00000095    agytestbucket/oneiric-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml                available       privatex86_64   kernel                  instance-store

  12. Delete the images manually from glance/swift

  agy@nova:~$ glance delete $((0x96))
  Delete image 150? [y/N] y
  Deleted image 150

  agy@dziban:~$ glance delete $((0x95))
  Delete image 149? [y/N] y
  Deleted image 149

  13. Check what euca-describe-images says - now they are gone

  agy@remote:~$ euca-describe-images ami-00000096 aki-00000095
  ImageNotFound: Image ami-00000096 could not be found.

  agy@remote:~$ euca-describe-images aki-00000095
  ImageNotFound: Image aki-00000095 could not be found.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/855663/+subscriptions