delete image emits failure message

Bug #1360117 reported by Kui Shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Kui Shi

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 |
+--------------------------------------+--------------------------------------+---------+

Kui Shi (skuicloud)
Changed in glance:
assignee: nobody → Kui Shi (skuicloud)
Revision history for this message
Erno Kuvaja (jokke) wrote :

Hello Kui,

What is that failure status you mentioned? For me it looks like it works, so could you please give bit more details what is the actual issue here?

- Erno

Changed in glance:
status: New → Incomplete
Revision history for this message
Kamil Rykowski (kamil-rykowski) wrote :

I couldn't reproduce the issue either. The image has been deleted, but there was no failure status anywhere. Due to lacks of required information to be able to reproduce it the bug is going to be closed. Feel free to reopen the bug by providing the requested information and set the bug status back to "New".

Changed in glance:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.