Skip to content

Commit 5bae6ca

Browse files
committed
scope warnings to only display if the services are enabled
On my devstack environments I'm now always getting the Q_AGENT warnings even though I don't have neutron enabled. This is mostly confusing. For these juno warnings lets just make sure that the whole thing only prints out in the case where we've actually got that service enabled. Change-Id: I7d1bb2e65594c8bee2f572ca58a1b666e5d6caed
1 parent 4407315 commit 5bae6ca

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
@@ -1392,51 +1392,55 @@ if [[ -n "$DEPRECATED_TEXT" ]]; then
13921392
echo_summary "WARNING: $DEPRECATED_TEXT"
13931393
fi
13941394

1395-
# TODO(dtroyer): Remove Q_AGENT_EXTRA_AGENT_OPTS after stable/juno branch is cut
1396-
if [[ -n "$Q_AGENT_EXTRA_AGENT_OPTS" ]]; then
1397-
echo ""
1398-
echo_summary "WARNING: Q_AGENT_EXTRA_AGENT_OPTS is used"
1399-
echo "You are using Q_AGENT_EXTRA_AGENT_OPTS to pass configuration into $NEUTRON_CONF."
1400-
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1401-
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1402-
echo "
1395+
if is_service_enabled neutron; then
1396+
# TODO(dtroyer): Remove Q_AGENT_EXTRA_AGENT_OPTS after stable/juno branch is cut
1397+
if [[ -n "$Q_AGENT_EXTRA_AGENT_OPTS" ]]; then
1398+
echo ""
1399+
echo_summary "WARNING: Q_AGENT_EXTRA_AGENT_OPTS is used"
1400+
echo "You are using Q_AGENT_EXTRA_AGENT_OPTS to pass configuration into $NEUTRON_CONF."
1401+
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1402+
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1403+
echo "
14031404
[[post-config|/\$Q_PLUGIN_CONF_FILE]]
14041405
[DEFAULT]
14051406
"
1406-
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
1407-
# Replace the first '=' with ' ' for iniset syntax
1408-
echo ${I}
1409-
done
1410-
fi
1407+
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
1408+
# Replace the first '=' with ' ' for iniset syntax
1409+
echo ${I}
1410+
done
1411+
fi
14111412

1412-
# TODO(dtroyer): Remove Q_AGENT_EXTRA_SRV_OPTS after stable/juno branch is cut
1413-
if [[ -n "$Q_AGENT_EXTRA_SRV_OPTS" ]]; then
1414-
echo ""
1415-
echo_summary "WARNING: Q_AGENT_EXTRA_SRV_OPTS is used"
1416-
echo "You are using Q_AGENT_EXTRA_SRV_OPTS to pass configuration into $NEUTRON_CONF."
1417-
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1418-
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1419-
echo "
1413+
# TODO(dtroyer): Remove Q_AGENT_EXTRA_SRV_OPTS after stable/juno branch is cut
1414+
if [[ -n "$Q_AGENT_EXTRA_SRV_OPTS" ]]; then
1415+
echo ""
1416+
echo_summary "WARNING: Q_AGENT_EXTRA_SRV_OPTS is used"
1417+
echo "You are using Q_AGENT_EXTRA_SRV_OPTS to pass configuration into $NEUTRON_CONF."
1418+
echo "Please convert that configuration in localrc to a $NEUTRON_CONF section in local.conf:"
1419+
echo "Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle"
1420+
echo "
14201421
[[post-config|/\$Q_PLUGIN_CONF_FILE]]
14211422
[DEFAULT]
14221423
"
1423-
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
1424-
# Replace the first '=' with ' ' for iniset syntax
1425-
echo ${I}
1426-
done
1424+
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
1425+
# Replace the first '=' with ' ' for iniset syntax
1426+
echo ${I}
1427+
done
1428+
fi
14271429
fi
14281430

1429-
# TODO(dtroyer): Remove CINDER_MULTI_LVM_BACKEND after stable/juno branch is cut
1430-
if [[ "$CINDER_MULTI_LVM_BACKEND" = "True" ]]; then
1431-
echo ""
1432-
echo_summary "WARNING: CINDER_MULTI_LVM_BACKEND is used"
1433-
echo "You are using CINDER_MULTI_LVM_BACKEND to configure Cinder's multiple LVM backends"
1434-
echo "Please convert that configuration in local.conf to use CINDER_ENABLED_BACKENDS."
1435-
echo "CINDER_ENABLED_BACKENDS will be removed early in the 'K' development cycle"
1436-
echo "
1431+
if is_service_enabled cinder; then
1432+
# TODO(dtroyer): Remove CINDER_MULTI_LVM_BACKEND after stable/juno branch is cut
1433+
if [[ "$CINDER_MULTI_LVM_BACKEND" = "True" ]]; then
1434+
echo ""
1435+
echo_summary "WARNING: CINDER_MULTI_LVM_BACKEND is used"
1436+
echo "You are using CINDER_MULTI_LVM_BACKEND to configure Cinder's multiple LVM backends"
1437+
echo "Please convert that configuration in local.conf to use CINDER_ENABLED_BACKENDS."
1438+
echo "CINDER_ENABLED_BACKENDS will be removed early in the 'K' development cycle"
1439+
echo "
14371440
[[local|localrc]]
14381441
CINDER_ENABLED_BACKENDS=lvm:lvmdriver-1,lvm:lvmdriver-2
14391442
"
1443+
fi
14401444
fi
14411445

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

0 commit comments

Comments
 (0)