Skip to content

Commit 7adc401

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Restrict database access to nova-compute in singleconductor mode"
2 parents 62c832b + 8253787 commit 7adc401

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lib/nova

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,25 +897,26 @@ function start_nova_compute {
897897
local compute_cell_conf=$NOVA_CONF
898898
fi
899899

900+
cp $compute_cell_conf $NOVA_CPU_CONF
901+
900902
if [[ "${CELLSV2_SETUP}" == "singleconductor" ]]; then
901903
# NOTE(danms): Grenade doesn't setup multi-cell rabbit, so
902904
# skip these bits and use the normal config.
903-
NOVA_CPU_CONF=$compute_cell_conf
904905
echo "Skipping multi-cell conductor fleet setup"
905906
else
906907
# "${CELLSV2_SETUP}" is "superconductor"
907-
cp $compute_cell_conf $NOVA_CPU_CONF
908908
# FIXME(danms): Should this be configurable?
909909
iniset $NOVA_CPU_CONF workarounds disable_group_policy_check_upcall True
910910
# Since the nova-compute service cannot reach nova-scheduler over
911911
# RPC, we also disable track_instance_changes.
912912
iniset $NOVA_CPU_CONF filter_scheduler track_instance_changes False
913913
iniset_rpc_backend nova $NOVA_CPU_CONF DEFAULT "nova_cell${NOVA_CPU_CELL}"
914-
# Make sure we nuke any database config
915-
inidelete $NOVA_CPU_CONF database connection
916-
inidelete $NOVA_CPU_CONF api_database connection
917914
fi
918915

916+
# Make sure we nuke any database config
917+
inidelete $NOVA_CPU_CONF database connection
918+
inidelete $NOVA_CPU_CONF api_database connection
919+
919920
# Console proxies were configured earlier in create_nova_conf. Now that the
920921
# nova-cpu.conf has been created, configure the console settings required
921922
# by the compute process.

0 commit comments

Comments
 (0)