From 6849a43cf69f8acdbcdf39b2a914c3a2f9e9a185 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 27 May 2019 09:58:18 +0200 Subject: [PATCH] devstack: configure rabbit outside of API configuration If enabled, rabbit is required for all ironic services, so it makes no sense to only configure it when API is enabled. This seems to break multinode grenade, since `is_service_enabled ir-api` returns false on the subnode. Try to configure the RPC backend in all cases when IRONIC_RPC_TRANSPORT is "oslo" (not JSON RPC). Also move the automated_clean option to the conductor where it belongs. Change-Id: I6e046c6b6e1e4c0ca7bfd5fb9ce5892c0298fb78 --- devstack/lib/ironic | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 51311d7a9a..6bccaf1366 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1242,6 +1242,11 @@ function configure_ironic { # Set fast track options iniset $IRONIC_CONF_FILE deploy fast_track $IRONIC_DEPLOY_FAST_TRACK + # No need to check if RabbitMQ is enabled, this call does it in a smart way + if [[ "$IRONIC_RPC_TRANSPORT" == "oslo" ]]; then + iniset_rpc_backend ironic $IRONIC_CONF_FILE + fi + # Configure Ironic conductor, if it was enabled. if is_service_enabled ir-cond; then configure_ironic_conductor @@ -1321,12 +1326,6 @@ function configure_ironic_api { iniset $IRONIC_CONF_FILE DEFAULT auth_strategy $IRONIC_AUTH_STRATEGY configure_auth_token_middleware $IRONIC_CONF_FILE ironic $IRONIC_AUTH_CACHE_DIR/api - if is_service_enabled rabbit; then - iniset_rpc_backend ironic $IRONIC_CONF_FILE - fi - - iniset $IRONIC_CONF_FILE conductor automated_clean $IRONIC_AUTOMATED_CLEAN_ENABLED - if [[ "$IRONIC_USE_WSGI" == "True" ]]; then iniset $IRONIC_CONF_FILE api public_endpoint $IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT elif is_service_enabled tls-proxy; then @@ -1374,6 +1373,8 @@ function configure_ironic_conductor { # set up drivers / hardware types iniset $IRONIC_CONF_FILE DEFAULT enabled_hardware_types $IRONIC_ENABLED_HARDWARE_TYPES + iniset $IRONIC_CONF_FILE conductor automated_clean $IRONIC_AUTOMATED_CLEAN_ENABLED + # configure enabled and default interfaces local iface local iface_var