Update aggregate allows duplicate names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Juan Manuel Ollé | ||
Havana |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The behaviour to manage naming conflicts is different between aggregate creation and aggregate update.
Aggregate create doesn't let you create 2 aggregates with the same name.
Aggregate update lets you update an aggregate to a name that already exists.
It seems to me it should be consistent, and probably both check for conflict.
Here's an example, using a recent devstack:
$ nova aggregate-create test
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 14 | test | - | | |
+----+-
$ nova aggregate-create test
ERROR: There was a conflict when trying to complete your request. (HTTP 409) (Request-ID: req-6711e05e-
$ nova aggregate-create test2
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 15 | test2 | - | | |
+----+-
$ nova aggregate-update 15 test
Aggregate 15 has been successfully updated.
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 15 | test | - | | |
+----+-
$ nova aggregate-list
+----+-
| Id | Name | Availability Zone |
+----+-
| 14 | test | - |
| 15 | test | - |
+----+-
Nova api logs from when the aggregate creation fails as expected:
2014-04-05 14:45:34.865 INFO nova.api.
2014-04-05 14:45:34.865 INFO nova.api.
2014-04-05 14:45:34.865 DEBUG nova.api.
Changed in nova: | |
assignee: | nobody → Juan Manuel Ollé (juan-m-olle) |
Changed in nova: | |
milestone: | none → icehouse-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-rc1 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/78749
Review: https:/