Skip to content

Commit 06b7352

Browse files
committed
Fix async race updating nova configs
The configure_neutron_nova function updates nova configs. While that is still running we separately update nova configs in stack.sh. This can result in unexpected configs (that don't work). Fix this by waiting for configure_neutron_nova to complete its work before we do nova config updates directly in stack.sh. For specifics we say that: [neutron] project_domain_name = Default was missing from both nova.conf and nova-cpu.conf and instances could not be created because keystone complained about not finding domain in project. The strong suspicion here is that on some systems configure_neutron_nova would write out project_domain_name while the stack.sh inisets were running resulting in stack.sh overwriting the project_domain_name content. One theory is that disabling swift makes this problem more likely as there is swift work in the middle of the async period. This is supported by the fact that our job that hits this problem does indeed disable swift. Change-Id: I0961d882d555a21233c6b4fbfc077cfe33b88499
1 parent bab78de commit 06b7352

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

stack.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,17 +1238,21 @@ fi
12381238
# deployments. This ensures the keys match across nova and cinder across all
12391239
# hosts.
12401240
FIXED_KEY=${FIXED_KEY:-bae3516cc1c0eb18b05440eba8012a4a880a2ee04d584a9c1579445e675b12defdc716ec}
1241-
if is_service_enabled nova; then
1242-
iniset $NOVA_CONF key_manager fixed_key "$FIXED_KEY"
1243-
iniset $NOVA_CPU_CONF key_manager fixed_key "$FIXED_KEY"
1244-
fi
1245-
12461241
if is_service_enabled cinder; then
12471242
iniset $CINDER_CONF key_manager fixed_key "$FIXED_KEY"
12481243
fi
12491244

12501245
async_wait configure_neutron_nova
12511246

1247+
# NOTE(clarkb): This must come after async_wait configure_neutron_nova because
1248+
# configure_neutron_nova modifies $NOVA_CONF and $NOVA_CPU_CONF as well. If
1249+
# we don't wait then these two ini updates race either other and can result
1250+
# in unexpected configs.
1251+
if is_service_enabled nova; then
1252+
iniset $NOVA_CONF key_manager fixed_key "$FIXED_KEY"
1253+
iniset $NOVA_CPU_CONF key_manager fixed_key "$FIXED_KEY"
1254+
fi
1255+
12521256
# Launch the nova-api and wait for it to answer before continuing
12531257
if is_service_enabled n-api; then
12541258
echo_summary "Starting Nova API"

0 commit comments

Comments
 (0)