Nova containers fail on password rotation
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
kolla | Status tracked in Caracal | |||||
Antelope |
Fix Released
|
Undecided
|
Unassigned | |||
Bobcat |
Fix Released
|
Undecided
|
Unassigned | |||
Caracal |
Fix Released
|
Undecided
|
Alex Welsh | |||
Yoga |
Fix Released
|
Undecided
|
Unassigned | |||
Zed |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The Nova API extended start script runs nova-manage db sync without the --local-cell argument.
If the database password is changed, cell0 will become inaccessible and cause an error.
To reproduce: deploy Nova, then update the nova database password and redeploy.
Seen on Ubuntu Jammy Yoga but expected to impact everyone.
Error:
msg: Container exited with non-zero return code 1
rc: 1
stderr: |-
+ sudo -E kolla_set_configs
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
INFO:
++ cat /run_command
+ CMD=false
+ ARGS=
+ sudo kolla_copy_cacerts
+ [[ ! -n '' ]]
+ . kolla_extend_start
++ [[ ! -d /var/log/kolla/nova ]]
+++ stat -c %a /var/log/kolla/nova
++ [[ 2755 != \7\5\5 ]]
++ chmod 755 /var/log/kolla/nova
++ . /usr/local/
+++ [[ -n '' ]]
+++ [[ -n 0 ]]
+++ nova-manage api_db sync
Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: urllib3. This warning can usually be ignored if the caller is only importing and not executing nova code.
+++ nova-manage db sync
Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: urllib3. This warning can usually be ignored if the caller is only importing and not executing nova code.
stderr_lines: <omitted>
stdout: |-
ERROR: Could not access cell0.
Has the nova_api database been created?
Has the nova_cell0 database been created?
Has "nova-manage api_db sync" been run?
Has "nova-manage cell_v2 map_cell0" been run?
Is [api_database]
Is the cell0 database connection URL correct?
Error: (pymysql.
(Background on this error at: https:/
stdout_lines: <omitted>
Changed in kolla: | |
assignee: | nobody → Alex Welsh (alex-welsh) |
Changed in kolla: | |
status: | New → In Progress |
description: | updated |
Reviewed: https:/ /review. opendev. org/c/openstack /kolla/ +/902057 /opendev. org/openstack/ kolla/commit/ de1487f05187387 aea3f113dcbb692 6734b1ce6b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit de1487f05187387 aea3f113dcbb692 6734b1ce6b
Author: Alex-Welsh <email address hidden>
Date: Tue Nov 28 13:08:58 2023 +0000
Sync only local cell in nova bootstrap & upgrade
Added the --local_cell argument to nova db sync commands during
bootstrap and upgrade.
This was previously thought to have no effect [1], but has since been
discovered to fail when rotating the nova database password.
[1] https:/ /opendev. org/openstack/ kolla-ansible/ src/branch/ master/ ansible/ roles/nova/ tasks/bootstrap _service. yml#L2- L3
Closes-Bug: #2045558 3a14ebab9b9ff2f 4d9caec734a
Change-Id: Ic64eb51325b350