In master and stable/pike, 409 error is returned in that case.
HTTP/1.1 409 Conflict
{"errors": [{"status": 409, "request_id":
"req-f34c6774-0d39-4deb-8d51-cda4819387f6", "detail": "There was a conflict
when trying to complete your request.\n\n Conflicting resource provider test
already exists. ", "title": "Conflict"}]}
And a uncaught exception is not logged in the log file.
12月 06 15:26:19 devstack-master [email protected][16874]: INFO
nova.api.openstack.placement.requestlog [None
req-f34c6774-0d39-4deb-8d51-cda4819387f6 admin admin] 10.0.2.15 "POST
/placement/resource_providers" status: 409 len: 237 microversion: 1.10
12月 06 15:26:19 devstack-master [email protected][16874]: [pid:
16876|app: 0|req: 2/4] 10.0.2.15 () {58 vars in 1006 bytes} [Wed Dec 6
15:26:19 2017] POST /placement/resource_providers => generated 237 bytes in 10
msecs (HTTP/1.1 409) 6 headers in 231 bytes (1 switches on core 0)
They are right behavior.
Environment
-----------
master: commit 9f46043f2f2463695385a6a14634664be4833e8e
stable/pike: commit 8f7f4b3ba6bb17e39fd3f2d22ed2457311988692
** Changed in: nova
Status: In Progress => Invalid
--
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/1736101
Title:
nova placement resource_providers DBDuplicateEntry when name repeat
Status in OpenStack Compute (nova):
Invalid
Bug description:
OpenStack Version: Pike
I have two compute nodes with same name. But only one record can be
successfully created in resource_providers table.
When resource_providers.name repeat, the record can not insert, and get error
message:
Uncaught exception: DBDuplicateEntry: (pymysql.err.IntegrityError) (1062,
u"Duplicate entry 'cvk17(CVM172.25.19.80)'for key
'uniq_resource_providers0name'") [SQL: u'INSERT INTO resource_providers
(created_at, updated_at, uuid, name, generation) VALUES...
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1736101/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp