updating metadata for an image loses custom Property
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Invalid
|
Undecided
|
Unassigned |
Bug Description
If you update an images metadata, it seems to lose any associated property tags. It shouldn't lose one field, just because you updated another?
Using a 3 part image (aki, ari, ami) that has been uploaded correctly so that the ami has references to the aki and ari:
# glance show 831152be-
URI: http://
Id: 831152be-
Public: Yes
Protected: No
Name: cirros-
Status: active
Size: 25165824
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: 874d123ab77f48a
Property 'kernel_id': 0195a1ad-
Property 'ramdisk_id': e5aa04fd-
Now update it's public status, for example:
# glance update 831152be-
Updated image 831152be-
Now show again - the Properties have been lost:
# glance show 831152be-
URI: http://
Id: 831152be-
Public: No
Protected: No
Name: cirros-
Status: active
Size: 25165824
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: 874d123ab77f48a
Hi Darren!
Unfortunately, this is the expected behaviour. We don't have a good way currently of dealng with custom properties with an update to the main metadata. When you issue a call to glance update, the call assumes that you are overwriting any custom properties with ones included on the command line.
You can read about the problem here: https:/ /bugs.launchpad .net/glance/ +bug/767027
In the next version of Glance's API, we plan on adding better support for modifying individual properties, which would alleviate this problem...
-jay