can not delete metadata key using aggregate-set-metadata

Bug #1334846 reported by Neetu Jain
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Christopher Yeoh

Bug Description

before i updated to latest code base ( my branch was i guess 20 days old)
i was able to delete metadata from the list using
nova aggregate-set-metadata id "key"
and add metadata by
nova aggregate-set-metadata id "key=value"

I am still abel to add but seems like the recent changes have messed up the delete

this is what is see now:-

njain@njain3:~/projects/devstack$ nova aggregate-set-metadata 2 "s=9"
Metadata has been successfully updated for aggregate 2.
+----+------+-------------------+-------+---------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+------+-------------------+-------+---------------------+
| 2 | 2 | - | | 'k=9', 's=9', 't=k' |
+----+------+-------------------+-------+---------------------+
njain@njain3:~/projects/devstack$ nova aggregate-set-metadata 2 "s"
ERROR (BadRequest): metadata.value is not a string or unicode (HTTP 400) (Request-ID: req-bf6dca91-d89e-4956-997c-1248c50fda56)
njain@njain3:~/projects/devstack$ nova aggregate-set-metadata 2 s
ERROR (BadRequest): metadata.value is not a string or unicode (HTTP 400) (Request-ID: req-14b9a48d-8e96-4a54-861a-fd52ea693abe)

Tags: nova-api
Revision history for this message
Neetu Jain (nutshi) wrote :

njain@njain3:~/projects/devstack$ nova --version
2.17.0.186

tags: added: nova-api
Changed in nova:
status: New → Confirmed
Changed in nova:
assignee: nobody → Christopher Yeoh (cyeoh-0)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/103040

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/103040
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bf2c7d9f2cbb5cc9cdf3f2bebb73bce8840e9084
Submitter: Jenkins
Branch: master

commit bf2c7d9f2cbb5cc9cdf3f2bebb73bce8840e9084
Author: Chris Yeoh <email address hidden>
Date: Fri Jun 27 16:20:33 2014 +0930

    Restore ability to delete aggregate metadata

    Commit I2c778f2237ba5bd2aa8335a0eae80f3aad3e9157 tightened the
    input validation for setting the metadata for an
    aggregate. However it also accidentally excluded sending
    null as the metadata value which has previously allowed the
    deletion of the metadata key rather than an update. This
    changeset relaxes the input validation to allow deletion of
    aggregate metadata again

    Change-Id: I54b91c2d421243e7e7521f2352598f73a258b88a
    Closes-Bug: 1334846

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.