Nova create duplicate cells when templates are used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Medium
|
Rajesh Tailor |
Bug Description
Description
===========
When you use templates for cell creation and re-run create_cell command, duplicate cell will be created
This happens because logic is broken here for templates: https:/
As cell.database_
Steps to reproduce
==================
Run 2 times: nova-manage cell_v2 create_cell --name cell1 --transport-url {scheme}
This will result in creating 2 independent cells:
root@aio1:~# /openstack/
046c88f0-
root@aio1:~# /openstack/
b5f1672e-
root@aio1:~# /openstack/
cf2efc1c-
root@aio1:~#
Expected result
===============
Following error should be raised along with command exit code 2:
The specified transport_url and/or database_connection combination already exists for another cell with uuid
Changed in nova: | |
assignee: | nobody → Rajesh Tailor (ratailor) |
Also attaching how database looks like after several runs of the command:
MariaDB [nova_api]> select * from cell_mappings; ------- ------- -+----- ------- ------- --+---- +------ ------- ------- ------- ------- ----+-- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+-- ------- -+ ------- ------- -+----- ------- ------- --+---- +------ ------- ------- ------- ------- ----+-- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+-- ------- -+ 0000-0000- 0000-0000000000 00 | cell0 | none:/// | mysql+pymysql: //nova_ api:e83ceeb01f3 093de3f23de63c4 a9d229eb78ce49a 15acfb1894b7543 97d@172. 29.236. 101/nova_ cell0?charset= utf8 | 0 | 142d-4755- a377-6ed23b6c1e d4 | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | b668-47a6- 943c-169c2ed976 a4 | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | 0710-4b0a- a1c5-9a42707bba a7 | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | 98e8-4da6- 91c5-46d0234afd 0e | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | 097e-4a7c- 9eee-45654355ff 56 | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | 36c7-4d17- 90b3-7433842cbb e0 | cell1 | {scheme} ://{username} :{password} @{hostname} //{path} ?{query} | {scheme} ://{username} :{password} @{hostname} /{path} ?{query} | 0 | e091-4c93- 96d4-84b3ecfa46 47 | cell1 | {scheme}...
+------
| created_at | updated_at | id | uuid | name | transport_url | database_connection | disabled |
+------
| 2021-04-14 10:49:46 | NULL | 1 | 00000000-
| 2021-04-14 10:50:17 | 2021-04-14 14:54:24 | 2 | ef89aebc-
| 2021-04-14 19:39:33 | NULL | 4 | e22e06d5-
| 2021-04-14 19:39:40 | NULL | 5 | 8be204c1-
| 2021-04-14 19:39:49 | NULL | 6 | f34f0e6c-
| 2021-04-14 19:41:50 | NULL | 7 | 046c88f0-
| 2021-04-14 19:41:54 | NULL | 8 | b5f1672e-
| 2021-04-14 19:41:58 | NULL | 9 | cf2efc1c-