multiple records on creating an image with location parameter.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
If an image is created with a '--location' parameter, multiple records are created on image_locations table.
Steps to reproduce:
1. Fire the following command using python-glanceclient for creating a new image.
glance image-create --name "ubuntu_
2. python-glanceclient successfully gets the image created and shows the details for the same. eg., with image id: 1305c94a-
3. Goto mysql database and fire the following queries:
mysql> select * from images where id='1305c94a-
*******
id: 1305c94a-
name: ubuntu_
size: 823132160
status: active
is_public: 0
created_at: 2013-07-15 06:27:31
updated_at: 2013-07-15 06:27:31
deleted_at: NULL
deleted: 0
disk_format: iso
container_format: bare
checksum: NULL
owner: 39e386d5c8db47c
min_disk: 0
min_ram: 0
protected: 0
1 row in set (0.00 sec)
mysql> select * from image_locations where image_id=
*******
id: 1684
image_id: 1305c94a-
value: http://
created_at: 2013-07-15 06:27:31
updated_at: 2013-07-15 06:27:31
deleted_at: 2013-07-15 06:27:31
deleted: 1
meta_data:
*******
id: 1685
image_id: 1305c94a-
value: http://
created_at: 2013-07-15 06:27:31
updated_at: 2013-07-15 06:27:31
deleted_at: NULL
deleted: 0
meta_data:.
2 rows in set (0.00 sec)
Notice that under the image_locations table, there are actually mutiple records created for the same location. One soft-deleted and second one with deleted set to 0.
P.S: This scenario could be reproduced only when '--location' parameter/value is passed as an argument to the 'glance image-create' command.
Had an image been uploaded as part of the 'glance image-create' command instead of location, then mutliple records does not get created on image_locations table.
Changed in glance: | |
assignee: | nobody → Venkatesh Sampath (venkateshsampath) |
Changed in glance: | |
assignee: | nobody → Ankit Agrawal (ankitagrawal) |
is this a glance client bug or glance?