Reviewed:  https://review.opendev.org/c/openstack/nova/+/873901
Committed: 
https://opendev.org/openstack/nova/commit/ca85ee4ad6f84b77d95b7ba18c459165078bf2d9
Submitter: "Zuul (22348)"
Branch:    master

commit ca85ee4ad6f84b77d95b7ba18c459165078bf2d9
Author: Rajesh Tailor <ratai...@redhat.com>
Date:   Thu Feb 9 17:41:04 2023 +0530

    Fix case-sensitivity for metadata keys
    
    As of now, if aggregate already has metadata keys 'abc' and
    user tries to update this using upper case 'ABC' or mixed case
    ('AbC','Abc' etc), then user gets KeyError exception.
    
    This change catch KeyError and raises AggregateMetadataKeyExists
    exception with 400 error code, when user tries to update
    case-sensitive metadata key.
    
    Closes-Bug: #1538011
    Change-Id: Icc418c20e14efa08b356d938839e430223836f80
    Signed-off-by: Melanie Witt <melw...@gmail.com>


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1538011

Title:
  Metadata keys are not case sensitive

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  [Summary]
  Unexpected API Error returned when set metadata for aggregate

  [Topo]
  devstack all-in-one node

  [Description and expect result]
  no Unexpected API Error returned when set metadata for aggregate

  [Reproduceable or not]
  reproduceable

  [Recreate Steps]

  On devstack:

  > nova aggregate-create agg1
  > nova aggregate-set-metadata agg1 abc=1
  > nova aggregate-set-metadata agg1 ABC=2

  1) create an aggregate, with metadata "abc":
  root@45-59:~# nova aggregate-details agg1
  +----+------+-------------------+-------+----------+
  | Id | Name | Availability Zone | Hosts | Metadata |
  +----+------+-------------------+-------+----------+
  | 4  | agg1 | -                 |       | 'abc=1'  |
  +----+------+-------------------+-------+----------+
  root@45-59:~#

  2)set metadata of the aggregate as "ABC", upper case of the
  existing metadata "abc", an Unexpected API Error returned:
  root@45-59:~# nova  aggregate-set-metadata agg1 ABC=2
  ERROR (ClientException): Unexpected API Error. Please report
   this at http://bugs.launchpad.net/nova/ and attach the Nova API
  log if possible.<type 'exceptions.KeyError'> (HTTP 500) (Request-ID:
  req-b45dddb2-24e6-4b8f-8901-2ed250ec787a)
  root@45-59:~#

  [Configration]
  reproduceable bug, no need

  [logs]
  reproduceable bug, no need

  [Root cause anlyze or debug inf]
  reproduceable bug

  [Attachment]
  None

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1538011/+subscriptions


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to