From bf235cd904101fed34a1f04fed981a662e37fff0 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 24 Jan 2022 07:02:46 -0800 Subject: [PATCH] Enable nova workaround for upgrade bug Nova recently introduced an issue that breaks FFU due to requiring new compute service records to be recorded before control services are allowed to start. However the former depends on the latter, which creates an unsatisfiable circular dependency. Since this has been both released and backported, Nova introduced a workaround config flag specifically to get out of that loop, which we set here if needed. Related-Bug: #1958883 Change-Id: If4820dd4ec7e05ade6eb4a82a328797102704570 Depends-On: https://review.opendev.org/c/openstack/nova/+/826097 --- grenaderc | 3 +++ projects/60_nova/upgrade.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/grenaderc b/grenaderc index 9fd7b5f7..488f4ac8 100644 --- a/grenaderc +++ b/grenaderc @@ -106,6 +106,9 @@ SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-30} # process? FORCE_ONLINE_MIGRATIONS=${FORCE_ONLINE_MIGRATIONS:-True} +# Should we enable Nova's mitigation for bug #1958883? +NOVA_ENABLE_UPGRADE_WORKAROUND=${NOVA_ENABLE_UPGRADE_WORKAROUND:-False} + # Local variables: # mode: shell-script # End: diff --git a/projects/60_nova/upgrade.sh b/projects/60_nova/upgrade.sh index 80299cc6..6dc7498d 100755 --- a/projects/60_nova/upgrade.sh +++ b/projects/60_nova/upgrade.sh @@ -74,6 +74,12 @@ $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync || die $LINENO "DB sy iniset $NOVA_CONF upgrade_levels compute auto +if [[ "$NOVA_ENABLE_UPGRADE_WORKAROUND" == "True" ]]; then + iniset $NOVA_CONF workarounds disable_compute_service_check_for_ffu True + iniset $NOVA_COND_CONF workarounds disable_compute_service_check_for_ffu True + iniset $NOVA_CPU_CONF workarounds disable_compute_service_check_for_ffu True +fi + if [[ "$FORCE_ONLINE_MIGRATIONS" == "True" ]]; then # Run "online" migrations that can complete before we start $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations || die $LINENO "Failed to run online_data_migrations"