From cbb3d64b5f69a91a84239f32d2539f328cc0ee59 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Wed, 12 Dec 2018 09:52:37 -0500 Subject: [PATCH] [devstack] properly clean ZFS backend Change-Id: Iedf157a2f156565ca7798cfd62954f4807922eae Signed-off-by: Sahid Orentino Ferdjaoui --- devstack/plugin.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index cd37314f..9bae2387 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -133,7 +133,11 @@ function shutdown_nova-lxd() { function cleanup_nova-lxd() { # Cleanup the service. if [ "$LXD_BACKEND_DRIVER" == "zfs" ]; then - sudo zpool destroy ${LXD_ZFS_ZPOOL} + pool=`lxc profile device get default root pool 2>> /dev/null || :` + if [ "$pool" == "$LXD_ZFS_ZPOOL" ]; then + sudo lxc profile device remove default root + sudo lxc storage delete $LXD_ZFS_ZPOOL + fi fi }