the key of aggregate's metadata accepts empty string as key

Bug #1262943 reported by Lee Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned

Bug Description

Use command: nova aggregate-set-metadata llg_aggregate ''='test_key_empty'

it returns:

+----+---------------+-------------------+-------+--------------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+---------------+-------------------+-------+--------------------------+
| 1 | llg_aggregate | None | [] | {u'': u'test_key_empty'} |
+----+---------------+-------------------+-------+--------------------------+

The empty key value is not meaningful, so we should add a limit to this.

Tags: aggregate nova
Lee Li (lilinguo)
Changed in nova:
assignee: nobody → Lee Li (lilinguo)
Changed in nova:
status: New → In Progress
importance: Undecided → Low
summary: - the key of aggregate's metadata accepts empty string
+ the key of aggregate's metadata accepts empty string as key
Sean Dague (sdague)
Changed in nova:
status: In Progress → Confirmed
Revision history for this message
Joe Gordon (jogo) wrote :

Do we reject empty strings for other API calls as well? If not then we shouldn't reject it here. This is part of the bigger API parameter validation story.

Revision history for this message
Lee Li (lilinguo) wrote :

The server's metadata API reject empty string, such as:
nova meta 888238e4-660b-4b87-8f76-8b25d2d86135 set ""="test empty key"
ERROR: 无效的元数据: Metadata property key blank (HTTP 400) (Request-ID: req-a208e709-e0d6-40e2-ad6b-70ba06a4ffc1)

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/63694

Changed in nova:
status: Confirmed → In Progress
Lee Li (lilinguo)
Changed in nova:
status: In Progress → Confirmed
status: Confirmed → Fix Committed
Lee Li (lilinguo)
Changed in nova:
assignee: Lee Li (lilinguo) → nobody
Changed in nova:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → 2014.1
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.