← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1865284] Re: The image cannot be deleted(no instance uses it)

 

Marking it as won't fix, please feel free to reopen.

** Changed in: glance
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1865284

Title:
  The image cannot be deleted(no instance uses it)

Status in Glance:
  Won't Fix

Bug description:
  i try to delete a image, however, i can't delete it even though no
  instances use it. i means i have checked with both `openstack server
  list --all-projects` and `openstack server list --all-projects
  --deleted`

  root@mgt01:~# openstack image delete a070fe08-b722-4726-90ae-ef5cb24ecaa0 --debug
  ...
  curl -g -i -X DELETE -H 'b'Content-Type': b'application/octet-stream'' -H 'b'X-Auth-Token': b'gAAAAABeWm3DVCPriqDt-ygrySLeAtpuc2-X069T5RWEA3bnpQEOKI3JEfNgaFIVDPPa1dhQZeUBeyW7h5QOn_uJGGSg6vAbfaEHgpwc8ybs33xtN_xe1mQ-37ij9p-9aZm-dy_SsiaRmvavohOyX10Xvj6RycEkMRuCGsZtcs0MUUQ6OaW6Rqw'' -H 'User-Agent: python-glanceclient' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'Connection: keep-alive' http://glance.openstack.svc.chongqing-spring.myinspurcloud.com:80/v2/images/a070fe08-b722-4726-90ae-ef5cb24ecaa0
  http://glance.openstack.svc.chongqing-spring.myinspurcloud.com:80 "DELETE /v2/images/a070fe08-b722-4726-90ae-ef5cb24ecaa0 HTTP/1.1" 409 299
  DELETE call to image for http://glance.openstack.svc.chongqing-spring.myinspurcloud.com:80/v2/images/a070fe08-b722-4726-90ae-ef5cb24ecaa0 used request id req-7521347e-5c94-4ce8-95ab-3f5cd7fb8747
  Request returned failure status 409.
  Failed to delete image with name or ID 'a070fe08-b722-4726-90ae-ef5cb24ecaa0': 409 Conflict: Image a070fe08-b722-4726-90ae-ef5cb24ecaa0 could not be deleted because it is in use: The image cannot be deleted because it is in use through the backend store outside of Glance. (HTTP 409)
  Failed to delete 1 of 1 images.
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cliff/app.py", line 400, in run_subcommand
      result = cmd.run(parsed_args)
    File "/usr/lib/python3/dist-packages/osc_lib/command/command.py", line 41, in run
      return super(Command, self).run(parsed_args)
    File "/usr/lib/python3/dist-packages/cliff/command.py", line 184, in run
      return_code = self.take_action(parsed_args) or 0
    File "/usr/lib/python3/dist-packages/openstackclient/image/v2/image.py", line 419, in take_action
      raise exceptions.CommandError(msg)
  osc_lib.exceptions.CommandError: Failed to delete 1 of 1 images.
  clean_up DeleteImage: Failed to delete 1 of 1 images.
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/osc_lib/shell.py", line 135, in run
      ret_val = super(OpenStackShell, self).run(argv)
    File "/usr/lib/python3/dist-packages/cliff/app.py", line 279, in run
      result = self.run_subcommand(remainder)
    File "/usr/lib/python3/dist-packages/osc_lib/shell.py", line 175, in run_subcommand
      ret_value = super(OpenStackShell, self).run_subcommand(argv)
    File "/usr/lib/python3/dist-packages/cliff/app.py", line 400, in run_subcommand
      result = cmd.run(parsed_args)
    File "/usr/lib/python3/dist-packages/osc_lib/command/command.py", line 41, in run
      return super(Command, self).run(parsed_args)
    File "/usr/lib/python3/dist-packages/cliff/command.py", line 184, in run
      return_code = self.take_action(parsed_args) or 0
    File "/usr/lib/python3/dist-packages/openstackclient/image/v2/image.py", line 419, in take_action
      raise exceptions.CommandError(msg)
  osc_lib.exceptions.CommandError: Failed to delete 1 of 1 images.

  END return value: 1

  root@mgt01:~# glance --version
  2.9.1

  
  This happens on only one image, i have not dig into the code, but i thought may be a bug related to glance.

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


References