Settings the availability zone deletes all attached metadata

Bug #1274924 reported by Thomas Bechtold on 2014-01-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Santiago Baldassin
Santiago Baldassin

Bug Description

I'm using latest git with devstack on Ubuntu 12.04.

When I update the availability zone the attached metadata gets deleted. Steps to reproduce the problem:

 1) nova aggregate-create testagg #assuming that this creates a new metadata entry with the Id 26
 2) nova aggregate-set-metadata 26 x=y
 3) nova aggregate-update 26 testagg zone1

Now the availability zone is set, but the x=y metadata is lost.

John Garbutt (johngarbutt) wrote :

I think that is as expected, it updates all the metadata to that supplied, however, its a bit confusing.

tags: added: api
Changed in nova:
status: New → Triaged
tags: added: nova-client
tags: added: novaclient
removed: nova-client
Joe Gordon (jogo) wrote :

This is working as expected.

We can update this behavior in the V3 API or make the python-novaclient more intelligent to handle this

Changed in python-novaclient:
assignee: nobody → Santiago Baldassin (santiago-b-baldassin)

hi guys, even when this is working as expected I don't think it's working ok. We have two api calls to do the same thing both set-metadata and update will manipulate the aggregate metadata.

Adding/updating availability zone ends up setting metadata then we should use update_aggregate_metadata instead of update_aggregate. I guess we are just replacing the existing metadata to enforce the uniqueness of availability zone for an aggregate.

Set metadata for aggregates will be added to the dashboard so I think before exposing the functionality to the end users we should figure this out

Changed in nova:
assignee: nobody → Santiago Baldassin (santiago-b-baldassin)
melanie witt (melwitt) wrote :

Novaclient could be updated to not pass on an empty metadata update (or pass the same/current metadata) if the user omits the argument on the command line.

Changed in python-novaclient:
importance: Undecided → Wishlist
status: New → Triaged

Won't be fixed in nova as it will introduce backward incompatibility. See review:

Changed in python-novaclient:
status: Triaged → In Progress

Please disregard my previous comment. Got confused with another bug

Changed in nova:
status: Triaged → In Progress
Dan Smith (danms) on 2014-04-11
tags: added: icehouse-backport-potential

Fixed in nova. No need to fix in python-nova-cllient

Submitter: Jenkins
Branch: master

commit 328beb0433c04a0888d38cbc2927248fdd963318
Author: Santiago Baldassin <email address hidden>
Date: Mon Mar 31 14:12:28 2014 -0300

    Do not replace the aggregate metadata when updating az

    When the aggregate availability zone is updated, the
    existing metadata should not be replaced

    Change-Id: Ife856af9e7dca836ebe8a1ec050effaad421e17d
    Closes-Bug: #1274924

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-06-11
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Changed in python-novaclient:
status: In Progress → Invalid

Fix proposed to branch: stable/icehouse

Change abandoned by Santiago Baldassin (<email address hidden>) on branch: stable/icehouse

Change abandoned by Santiago Baldassin (<email address hidden>) on branch: stable/icehouse

Thierry Carrez (ttx) on 2014-10-16
Changed in nova:
milestone: juno-1 → 2014.2

Change abandoned by David Geng (<email address hidden>) on branch: stable/icehouse

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints