Skip to content

Commit 8253787

Browse files
committed
Restrict database access to nova-compute in singleconductor mode
Change I4820abe57a023050dd8d067c77e26028801ff288 removed access to the database for the nova-compute process but only in superconductor mode. Grenade runs in singleconductor mode though so we are getting tracebacks in nova-compute logs during grenade runs because nova-compute is running with nova.conf which is configured with access to the nova API database. This change handles removing database access for nova-compute generically to cover both the singleconductor and superconductor cases. Change-Id: I81301eeecc7669a169deeb1e2c5d298a595aab94 Closes-Bug: #1812398
1 parent 85e6aaf commit 8253787

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)