Ask Your Question
0

Update one property erase others

asked 2011-04-20 10:46:55 -0500

ethuleau gravatar image

I use Glance (bzr116) on ubuntu 10.04 LTS.

if I update a property of an image, the older properties (set before) are erased.

Example:

$ glance show 71
URI: http://0.0.0.0/images/71 Id: 71 Public: No Name: Ubuntu_64.71 Size: 0 Location: None Disk format: ami Container format: ami Property 'image_location': snapshot Property 'image_state': available Property 'kernel_id': 59 Property 'ramdisk_id': None Property 'architecture': x86_64 Property 'owner_id': simple

$ glance update 71 is_public=true

$ glance show 71 URI: http://0.0.0.0/images/71 Id: 71 Public: Yes Name: Ubuntu_64.71 Size: 10737418240 Location: file:///media/nas/OpenStack/Glance/71 Disk format: ami Container format: ami

Another sample :

$ glance show 60
URI: http://0.0.0.0/images/60 Id: 60 Public: Yes Name: Ubuntu_64 Size: 3221225472 Location: file:///media/nas/OpenStack/Glance/60 Disk format: ami Container format: ami Property 'architecture': x86_64

$ glance upload 60 kernel_id=59

$ glance show 60 URI: http://0.0.0.0/images/60 Id: 60 Public: Yes Name: Ubuntu_64 Size: 3221225472 Location: file:///media/nas/OpenStack/Glance/60 Disk format: ami Container format: ami Property 'kernel_id': 59

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2011-04-20 13:15:25 -0500

ethuleau gravatar image

The answer of Dan resolve it.

edit flag offensive delete link more
0

answered 2011-04-20 13:14:12 -0500

ethuleau gravatar image

Transform it to a question

edit flag offensive delete link more
0

answered 2011-04-20 12:48:40 -0500

I'd go question for this one.

edit flag offensive delete link more
0

answered 2011-04-20 11:41:14 -0500

ethuleau gravatar image

Ok, I missed that. Sorry.

Should I close or transform this bug to question ?

edit flag offensive delete link more
0

answered 2011-04-20 11:21:24 -0500

Hi Edouard,

This is a know behavior in glance. From the help page:

./glance help update

glance update [options] <id> <field1=value1 field2="value2" ...&gt;<="" p="">

Updates an image's metadata in Glance. Specify metadata fields as arguments.

Metadata fields that are not specified in the update command will be deleted.

All field/value pairs are converted into a mapping that is passed

to Glance that represents the metadata for an image.

We talked about this potential usability issue late in the cactus release cycle. Most everyone agrees that glance would benefit from a subresource style way to edit and manage properties for glance metadata. For now the glance bin 'update' method is overloaded a bit meaning that it deletes properties that are not longer there.

Hope this helps.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-04-20 10:46:55 -0500

Seen: 56 times

Last updated: Apr 20 '11