The behaviors of creating and updating mapping cell0 differ
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Medium
|
Surya Seetharaman |
Bug Description
Description
===========
The behaviors of creating and updating cell0 differ. Given that the parameters to nova-manage did not change, I would have expected no changes made to the cell_mappings table other than updating updated_at.
Steps to reproduce
==================
NOTE: Be sure to replace <MUST_BE_
OPTIONAL NOTE: In order to restart nova-api and run "nova service-list" successfully, replace "mysql+
controller1:~ # mkdir -p /etc/novabug
controller1:~ # cat << EOF > /etc/novabug/
[database]
backend = sqlalchemy
connection = mysql+pymysql:
[api_database]
connection = <MUST_BE_
EOF
controller1:~ # cat << EOF > /etc/novabug/
[DEFAULT]
transport_url = rabbit:
EOF
controller1:~ # chown -R nova:nova /etc/novabug
controller1:~ # /usr/local/
controller1:~ # mysql -D nova_api -e "select * from cell_mappings"
+------
| created_at | updated_at | id | uuid | name | transport_url | database_connection |
+------
| 2018-09-26 09:14:21 | NULL | 1 | 00000000-
+------
controller1:~ # /usr/local/
controller1:~ # mysql -D nova_api -e "select * from cell_mappings"
+------
| created_at | updated_at | id | uuid | name | transport_url | database_connection |
+------
| 2018-09-26 09:14:21 | 2018-09-26 09:15:01 | 1 | 00000000-
+------
Expected result
===============
Given that the parameters to nova-manage did not change, I would have expected no changes made to the transport_url and database_connection values of cell0.
Actual result
=============
After running "cell_v2 update_cell --cell_uuid 00000000-
controller1:~ # service nova-api restart
controller1:~ # nova service-list
+----+-
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+-
| 1 | nova-conductor | controller1 | internal | enabled | up | 2018-09-
| 2 | nova-scheduler | controller1 | internal | enabled | up | 2018-09-
| 3 | nova-consoleauth | controller1 | internal | enabled | up | 2018-09-
| 6 | nova-compute | compute001 | nova | enabled | up | 2018-09-
| 1 | nova-conductor | controller1 | internal | enabled | up | 2018-09-
| 2 | nova-scheduler | controller1 | internal | enabled | up | 2018-09-
| 3 | nova-consoleauth | controller1 | internal | enabled | up | 2018-09-
| 6 | nova-compute | compute001 | nova | enabled | up | 2018-09-
+----+-
Environment
===========
Version: Current master branch
Workaround
==========
We are having to avoid using the --config-file parameters altogether and duplicate the cell0 logic from nova/cmd/manage.py in our own scripts by:
1) For "cell_v2 map_cell0", specifying --database_
2) For "cell_v2 update_cell" of cell0, specifying --database_
3) For creating or updating cell1, specifying --database_
summary: |
- The behaviors of creating and updating cell0 mapping differ + The behaviors of creating and updating mapping cell0 differ |
tags: | added: cells nova-manage |
This is similar to https:/ /bugs.launchpad .net/nova/ +bug/1793423 but for cell0 and it had a review https:/ /review. openstack. org/#/c/ 603998 submitted and it was abandoned because this behavior of update_cell taking options from the config file is designed on purpose. See the comments. It would be expected that the corresponding config file of that cell conductor (default nova.conf for cell0) would be used for the update of that cell. However since cell0 is a special case and it doesn't have a transport url, the update_cell command should check for this and not update the cell0's transport_url when using the default nova.conf (like in the default devstack setup), just like we don't allow disabling cell0.