updating metadata for an image loses custom Property

Bug #925550 reported by Darren Birkett
6
This bug affects 1 person
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-66dd-4ab0-97af-bb360516de3f
URI: http://0.0.0.0:9292/v1/images/831152be-66dd-4ab0-97af-bb360516de3f
Id: 831152be-66dd-4ab0-97af-bb360516de3f
Public: Yes
Protected: No
Name: cirros-0.3.0-x86_64-blank
Status: active
Size: 25165824
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: 874d123ab77f48a6be43b68c89736b44
Property 'kernel_id': 0195a1ad-23a9-455d-a822-c340761099dd
Property 'ramdisk_id': e5aa04fd-3b16-48d7-a344-689f63d72e08

Now update it's public status, for example:

# glance update 831152be-66dd-4ab0-97af-bb360516de3f is_public=False
Updated image 831152be-66dd-4ab0-97af-bb360516de3f

Now show again - the Properties have been lost:

# glance show 831152be-66dd-4ab0-97af-bb360516de3f
URI: http://0.0.0.0:9292/v1/images/831152be-66dd-4ab0-97af-bb360516de3f
Id: 831152be-66dd-4ab0-97af-bb360516de3f
Public: No
Protected: No
Name: cirros-0.3.0-x86_64-blank
Status: active
Size: 25165824
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: 874d123ab77f48a6be43b68c89736b44

Revision history for this message
Jay Pipes (jaypipes) wrote :

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

Changed in glance:
status: New → 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.