From 5d49484eb6ae4fc1cf59c110a725d33aaad0b038 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Thu, 25 Mar 2021 07:45:35 +0100 Subject: [PATCH] Fix devstack cleanup when using amphorav2 When cleaning up a devstack environment with amphorav2 enabled, ./clean.sh might fail because redis has already been stopped and uninstalled. This commit move the stop_redis step to the octavia_stop step and ensures that stopping redis doesn't fail. Change-Id: I987535e90cbf13917c50c5905c64b614188928ec (cherry picked from commit 5d470357ec6acd7f31a626283be14154968c0798) (cherry picked from commit 168f1a121266bd0c4ae15b1887f8e9e14022824d) --- devstack/plugin.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 3d6045de53..33f1824239 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -258,6 +258,10 @@ function install_redis { } +function stop_redis { + stop_service redis || true +} + function uninstall_redis { if is_fedora; then uninstall_package redis @@ -266,9 +270,6 @@ function uninstall_redis { elif is_suse; then uninstall_package redis fi - - stop_service redis - } function octavia_configure { @@ -658,6 +659,10 @@ function octavia_stop { else die "Unknown network controller. Please define octavia_delete_network_interface_device" fi + + if [[ ${OCTAVIA_ENABLE_AMPHORAV2_JOBBOARD} == True ]]; then + stop_redis + fi } function octavia_cleanup {