aggregate availability_zone update deletes metadata
Bug #1200369 reported by
Dean Troyer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Yuriy Zveryanskyy |
Bug Description
When POST /os-aggregates/%s includes an 'availability_zone' value in the body the metadata for that aggregate is replaced with "{u'availabilit
Changed in nova: | |
assignee: | nobody → Yuriy Zveryanskyy (yzveryanskyy) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-2 → 2013.2 |
To post a comment you must log in.
Recreation using a basic devstack install:
$ nova aggregate-create agg1 zone1 -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+ -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+ _zone': u'zone1'} | -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 8 | agg1 | zone1 | [] | {u'availability
+----+-
$ nova aggregate- set-metadata 8 test=1 attempt=3 -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+ -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+ zone': u'zone1'} | -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+
Aggregate 8 has been successfully updated.
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 8 | agg1 | zone1 | [] | {u'test': u'1', u'attempt': u'3', u'availability_
+----+-
Ok, everything is as expected so far.
$ $ nova --debug aggregate-update 8 agg1 zone2
REQ: curl -i http:// 10.130. 50.20:5000/ v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCreden tials": {"username": "admin", "password": "0penstack"}}}'
INFO (connectionpool :191) Starting new HTTP connection (1): 10.130.50.20 :283) "POST /v2.0/tokens HTTP/1.1" 200 2348
DEBUG (connectionpool
RESP: [200] {'date': 'Thu, 11 Jul 2013 20:31:14 GMT', 'content-type': 'application/json', 'content-length': '2348', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": ... body omitted ... }
REQ: curl -i http:// 10.130. 50.20:8774/ v2/ec2a56fa9fb5 4b259b89b2bfc10 752fd/os- aggregates/ 8 -X PUT -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: a1f6a8ab9817452 7909c8ba55ebeba 3b" -d '{"aggregate": {"name": "agg1", "availability_ zone": "zone2"}}'
INFO (connectionpool :191) Starting new HTTP connection (1): 10.130.50.20 :283) "PUT /v2/ec2a56fa9fb 54b259b89b2bfc1 0752fd/ os-aggregates/ 8 HTTP/1.1" 200 225 request- id': 'req-d20600e2- 6807-429b- acb9-e03c5ce049 cb'} zone": "zone2", "deleted": 0, "created_at": "2013-07- 11T20:28: 38.000000" , "updated_at": null, "hosts": [], "deleted_at": null, "id": 8, "metadata": {"availability_ zone": "zone2"}}}
DEBUG (connectionpool
RESP: [200] {'date': 'Thu, 11 Jul 2013 20:31:15 GMT', 'content-length': '225', 'content-type': 'application/json', 'x-compute-
RESP BODY: {"aggregate": {"name": "agg1", "availability_
Aggregate 8 has been successfully updated. -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+ -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+ _zone': u'zone2'} | -----+- ------- ------- ----+-- -----+- ------- ------- ------- ------- -----+
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 8 | agg1 | zone2 | [] | {u'availability
+----+-
Existing metadata is gone.