Skip to content

Commit 78d7c60

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "scope warnings to only display if the services are enabled"
2 parents a90898d + 5bae6ca commit 78d7c60

1 file changed

Lines changed: 37 additions & 33 deletions

File tree

stack.sh

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,51 +1423,55 @@ if [[ -n "$DEPRECATED_TEXT" ]]; then
14231423
echo_summary "WARNING: $DEPRECATED_TEXT"
14241424
fi
14251425

1426-
# TODO(dtroyer): Remove Q_AGENT_EXTRA_AGENT_OPTS after stable/juno branch is cut
1427-
if [[ -n "$Q_AGENT_EXTRA_AGENT_OPTS" ]]; then
1428-
echo ""
1429-
echo_summary "WARNING: Q_AGENT_EXTRA_AGENT_OPTS is used"
1430-
echo "You are using Q_AGENT_EXTRA_AGENT_OPTS to pass configuration into $NEUTRON_CONF."
1431-
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1432-
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1433-
echo "
1426+
if is_service_enabled neutron; then
1427+
# TODO(dtroyer): Remove Q_AGENT_EXTRA_AGENT_OPTS after stable/juno branch is cut
1428+
if [[ -n "$Q_AGENT_EXTRA_AGENT_OPTS" ]]; then
1429+
echo ""
1430+
echo_summary "WARNING: Q_AGENT_EXTRA_AGENT_OPTS is used"
1431+
echo "You are using Q_AGENT_EXTRA_AGENT_OPTS to pass configuration into $NEUTRON_CONF."
1432+
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1433+
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1434+
echo "
14341435
[[post-config|/\$Q_PLUGIN_CONF_FILE]]
14351436
[DEFAULT]
14361437
"
1437-
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
1438-
# Replace the first '=' with ' ' for iniset syntax
1439-
echo ${I}
1440-
done
1441-
fi
1438+
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
1439+
# Replace the first '=' with ' ' for iniset syntax
1440+
echo ${I}
1441+
done
1442+
fi
14421443

1443-
# TODO(dtroyer): Remove Q_AGENT_EXTRA_SRV_OPTS after stable/juno branch is cut
1444-
if [[ -n "$Q_AGENT_EXTRA_SRV_OPTS" ]]; then
1445-
echo ""
1446-
echo_summary "WARNING: Q_AGENT_EXTRA_SRV_OPTS is used"
1447-
echo "You are using Q_AGENT_EXTRA_SRV_OPTS to pass configuration into $NEUTRON_CONF."
1448-
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1449-
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1450-
echo "
1444+
# TODO(dtroyer): Remove Q_AGENT_EXTRA_SRV_OPTS after stable/juno branch is cut
1445+
if [[ -n "$Q_AGENT_EXTRA_SRV_OPTS" ]]; then
1446+
echo ""
1447+
echo_summary "WARNING: Q_AGENT_EXTRA_SRV_OPTS is used"
1448+
echo "You are using Q_AGENT_EXTRA_SRV_OPTS to pass configuration into $NEUTRON_CONF."
1449+
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1450+
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1451+
echo "
14511452
[[post-config|/\$Q_PLUGIN_CONF_FILE]]
14521453
[DEFAULT]
14531454
"
1454-
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
1455-
# Replace the first '=' with ' ' for iniset syntax
1456-
echo ${I}
1457-
done
1455+
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
1456+
# Replace the first '=' with ' ' for iniset syntax
1457+
echo ${I}
1458+
done
1459+
fi
14581460
fi
14591461

1460-
# TODO(dtroyer): Remove CINDER_MULTI_LVM_BACKEND after stable/juno branch is cut
1461-
if [[ "$CINDER_MULTI_LVM_BACKEND" = "True" ]]; then
1462-
echo ""
1463-
echo_summary "WARNING: CINDER_MULTI_LVM_BACKEND is used"
1464-
echo "You are using CINDER_MULTI_LVM_BACKEND to configure Cinder's multiple LVM backends"
1465-
echo "Please convert that configuration in local.conf to use CINDER_ENABLED_BACKENDS."
1466-
echo "CINDER_ENABLED_BACKENDS will be removed early in the 'K' development cycle"
1467-
echo "
1462+
if is_service_enabled cinder; then
1463+
# TODO(dtroyer): Remove CINDER_MULTI_LVM_BACKEND after stable/juno branch is cut
1464+
if [[ "$CINDER_MULTI_LVM_BACKEND" = "True" ]]; then
1465+
echo ""
1466+
echo_summary "WARNING: CINDER_MULTI_LVM_BACKEND is used"
1467+
echo "You are using CINDER_MULTI_LVM_BACKEND to configure Cinder's multiple LVM backends"
1468+
echo "Please convert that configuration in local.conf to use CINDER_ENABLED_BACKENDS."
1469+
echo "CINDER_ENABLED_BACKENDS will be removed early in the 'K' development cycle"
1470+
echo "
14681471
[[local|localrc]]
14691472
CINDER_ENABLED_BACKENDS=lvm:lvmdriver-1,lvm:lvmdriver-2
14701473
"
1474+
fi
14711475
fi
14721476

14731477
# Indicate how long this took to run (bash maintained variable ``SECONDS``)

0 commit comments

Comments
 (0)