[devstack] properly clean ZFS backend
Change-Id: Iedf157a2f156565ca7798cfd62954f4807922eae Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
This commit is contained in:
parent
58974a6a6b
commit
cbb3d64b5f
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue