nova-manage cellv2 create_cell might create a duplicate cell1

Bug #1736731 reported by Adrien Cunin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Low
Rajesh Tailor
openstack-ansible
Fix Released
High
Marcin Bukowski

Bug Description

The "Perform cell_v2 initial cell setup" task runs "nova-manage cell_v2 create_cell" with endpoints for the DB and RabbitMQ. This is idempotent on the Nova side as long as you give exactly the same endpoints. If you don't, then Nova creates a new, almost identical, cell.

Experienced this issue when adding a RabbitMQ node to the cluster, I ended up with two "cell1". This confuses Nova a little bit... "openstack compute service list" returns every service twice, resource usage reports are incorrect by a factor of two, etc.

Because (as far as I know) OSA can handle only one cell anyway currently, it should *update* the existing cell if there is one, instead of creating it.

Similar bug in TripleO: https://bugs.launchpad.net/tripleo/+bug/1718912

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

It looks reasonable to me to update if they have the same name by default, but I'd like others to step in too.

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

The fix for this will need to be ported back all the way to Ocata.

Changed in openstack-ansible:
assignee: nobody → Jean-Philippe Evrard (jean-philippe-evrard)
Revision history for this message
Adrien Cunin (adri2000) wrote :

Not sure how we're going to fix that properly, because to use `nova-manage cell_v2 update_cell` we need the cell_uuid, and looks like the only way to get it is to parse the tabular output of `nova-manage cell_v2 list_cells`...

Changed in openstack-ansible:
assignee: Jean-Philippe Evrard (jean-philippe-evrard) → Marcin Bukowski (inectsec)
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

I believe that this bug has been covered with https://review.opendev.org/c/openstack/openstack-ansible-os_nova/+/786258

Can you kindly check that and confirm?

Changed in openstack-ansible:
status: Confirmed → Fix Released
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

There's also a related bug report to nova team https://bugs.launchpad.net/nova/+bug/1923899

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Sounds a legit bug in Nova.
We only verify the existing transport url and database connections as being unique for a cell here : https://github.com/openstack/nova/blob/c4cd6ee4615a35a57dd6a2f3cb5a9cbc8653f7ee/nova/cmd/manage.py#L662-L675

That being said, we don't verify that the name is not unique here https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L1116 as there is no UniqueConstraint in the DB on the name field https://github.com/openstack/nova/blob/c4cd6ee4615a35a57dd6a2f3cb5a9cbc8653f7ee/nova/db/api/models.py#L141

Putting it as Triaged then, as I think two cells having the same name (using different transport URLs) could be an issue for the operator.

Changed in nova:
status: New → Triaged
importance: Undecided → Low
tags: added: cells
tags: added: nova-manage
summary: - os_nova might create a duplicate cell1
+ nova-manage cellv2 create_cell might create a duplicate cell1
tags: added: low-hanging-fruit
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

@sylvain-bauza I'd likely marked this one as duplicate of #1923899 in nova at least. I just didn't know other way to link bugs then add it another project...

Or you can close 2 in one shot :)

Rajesh Tailor (ratailor)
Changed in nova:
assignee: nobody → Rajesh Tailor (ratailor)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/876940

Changed in nova:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.