← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1360117] [NEW] delete image emits failure message

 

Public bug reported:

When upgrading Openstack, we need backup the vm, and restore them in new version of openstack. so we may need to save
the vm snapshot image named by its vm uuid.

If we "glance image-create" the vm image, and name it with "uuid", then delete it, there will be failure message:
Request returned failure status.

But it indeed "removed"  the vm. ( marked as "deleted" in database).

The message should not be emitted.


step to reproduce:

1. create a image, and assign the name with a 'uuid'.

# glance image-create --name 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b  --file 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b   --disk-format=qcow2 --container-format=bare --is-public True
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 64d7c1cd2b6f60c92c14662941cb7913     |
| container_format | bare                                 |
| created_at       | 2014-08-22T07:26:17                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b |
| owner            | 2c39eaafe4e347f682995e0f21c6ee65     |
| protected        | False                                |
| size             | 13167616                             |
| status           | active                               |
| updated_at       | 2014-08-22T07:26:18                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+


2.  confirm the image is uploaded.

# glance image-list |grep 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b
| 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b | qcow2       | bare             | 13167616    | active |


3. delete the image

# glance image-delete 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b 
Request returned failure status.

4. the image can not be listed.
# glance image-list |grep 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b


5. the image is marked as "deleted" in database.
mysql> select id,name,deleted from glance.images where name='5d5b7329-2f89-4cba-a6cc-5d4b49330d3b';
+--------------------------------------+--------------------------------------+---------+
| id                                   | name                                 | deleted |
+--------------------------------------+--------------------------------------+---------+
| 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b |       1 |
+--------------------------------------+--------------------------------------+---------+

** Affects: glance
     Importance: Undecided
     Assignee: Kui Shi (skuicloud)
         Status: New

** Changed in: glance
     Assignee: (unassigned) => Kui Shi (skuicloud)

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

Title:
  delete image emits failure message

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  When upgrading Openstack, we need backup the vm, and restore them in new version of openstack. so we may need to save
  the vm snapshot image named by its vm uuid.

  If we "glance image-create" the vm image, and name it with "uuid", then delete it, there will be failure message:
  Request returned failure status.

  But it indeed "removed"  the vm. ( marked as "deleted" in database).

  The message should not be emitted.

  
  step to reproduce:

  1. create a image, and assign the name with a 'uuid'.

  # glance image-create --name 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b  --file 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b   --disk-format=qcow2 --container-format=bare --is-public True
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 64d7c1cd2b6f60c92c14662941cb7913     |
  | container_format | bare                                 |
  | created_at       | 2014-08-22T07:26:17                  |
  | deleted          | False                                |
  | deleted_at       | None                                 |
  | disk_format      | qcow2                                |
  | id               | 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 |
  | is_public        | True                                 |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b |
  | owner            | 2c39eaafe4e347f682995e0f21c6ee65     |
  | protected        | False                                |
  | size             | 13167616                             |
  | status           | active                               |
  | updated_at       | 2014-08-22T07:26:18                  |
  | virtual_size     | None                                 |
  +------------------+--------------------------------------+


  2.  confirm the image is uploaded.

  # glance image-list |grep 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b
  | 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b | qcow2       | bare             | 13167616    | active |


  3. delete the image

  # glance image-delete 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b 
  Request returned failure status.

  4. the image can not be listed.
  # glance image-list |grep 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b

  
  5. the image is marked as "deleted" in database.
  mysql> select id,name,deleted from glance.images where name='5d5b7329-2f89-4cba-a6cc-5d4b49330d3b';
  +--------------------------------------+--------------------------------------+---------+
  | id                                   | name                                 | deleted |
  +--------------------------------------+--------------------------------------+---------+
  | 0e7e8257-a17a-44b5-9fc2-3fd0d121a7e3 | 5d5b7329-2f89-4cba-a6cc-5d4b49330d3b |       1 |
  +--------------------------------------+--------------------------------------+---------+

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


Follow ups

References