properties should be marked as deleted=0 on update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Dan Prince |
Bug Description
Using glance 100.
If I use the 'glance' command line utility to update image properties previously deleted properties aren't getting marked as deleted=0 on an update.
The following commands demonstrate the issue:
glance update 3 kernel_id="2" ramdisk_id="1" type="machine" disk_format="ami" container_
# run the same command and remove kernel_id and ramdisk
glance update 3 type="machine" disk_format="ami" container_
# add back kernel_id and ramdisk
glance update 3 kernel_id="2" ramdisk_id="1" type="machine" disk_format="ami" container_
#glance details then reports:
URI: http://
Id: 3
Public: Yes
Name: ami-tty
Size: 25165824
Location: file://
Disk format: ami
Container format: ami
Property 'type': machine
** NOTE that kernel_id and ramdisk weren't readded.
They exist in the DB and are marked as deleted=0.
The attached patch resolves the issue. Branch coming shortly...
Related branches
- Rick Harris (community): Approve
- Jay Pipes (community): Approve
-
Diff: 71 lines (+32/-0)3 files modifiedbin/glance (+2/-0)
glance/registry/db/api.py (+1/-0)
tests/functional/test_curl_api.py (+29/-0)
Changed in glance: | |
status: | New → In Progress |
Changed in glance: | |
importance: | Undecided → High |
milestone: | none → cactus-rc |
Changed in glance: | |
status: | In Progress → Fix Committed |
Changed in glance: | |
milestone: | cactus-rc → 2011.2 |
status: | Fix Committed → Fix Released |
The second glance update should *not* mark the kernel_id and ramdisk_id properties as deleted. Isn't that the real issue?