From 39734a70c54f9663c9f734334a9c7a775c87b26a Mon Sep 17 00:00:00 2001
From: Tom Barron <tpb@dyncloud.net>
Date: Fri, 11 Dec 2020 09:52:18 -0500
Subject: [PATCH] Stop manila when unstacking

When you run unstack.sh from devstack, other devstack
services are stopped and disabled to provide a clean environment
for a restack, but manila services are left running.

This doesn't matter for CI where a new VM is stood up for each
devstack but it's inconvenient for local devstack and if you
restack without restarting the services manually the results you
see may not actually match the environment you intended.

Change-Id: I6761619042e4bc36ec2f1cab4be33cb1b39d00d7
---
 devstack/plugin.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 7d3d983b2d..69b09de919 100755
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -1324,10 +1324,12 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
 fi
 
 if [[ "$1" == "unstack" ]]; then
+    stop_manila
     cleanup_manila
 fi
 
 if [[ "$1" == "clean" ]]; then
+    stop_manila
     cleanup_manila
     sudo rm -rf /etc/manila
 fi