cells v2 accepts creating two cells with same name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I'm not seeing that nova-manage cell_v2 provides a way to update the transport_url (or database) for a cell. It's possible that I'm missing something here but I've not found a way to do this.
This is a problem when scaling rabbitmq, for example. If I have a cell associated with a single rabbitmq instance and I want to scale to 2 rmq instances, then there needs to be a way to update the database for the cell.
Running 'nova-manage cell_v2 create_cell --name cell1' twice, 1st time with the transport_url in nova.conf having one rmq server, and 2nd time with the transport_url in nova.conf having two rmq servers is successful. After this, there are two cell_mappings records for "cell1", and it appears that the first entry is what ends up being used for ensuing commands (ie. if I take the the original rmq out of active/active HA, I can't deploy an instance).
Here's what the cell_mappings table looks like after the 2nd create_cell call:
mysql> select * from cell_mappings;
+------
| created_at | updated_at | id | uuid | name | transport_url | database_connection |
+------
| 2017-02-14 21:06:49 | NULL | 1 | 00000000-
| 2017-02-14 21:06:56 | NULL | 2 | 1499460c-
| 2017-02-14 22:35:48 | NULL | 5 | 4b363076-
+------
It seems as if the 2nd cell_create call should update the original cell1 record, or there should be an cell_update subcommand.
tags: | added: cells |
We should disallow the possibility to have a second row with the same cell name since it could clash later on.
That said, having the possibility to update the cell transport_url doesn't seem a bug to me, just a missing feature. For the moment, just update the DB directly.