From 1f055dcd42045cfb13faeec856e8b22713fe3b2a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 22 Oct 2015 10:43:21 -0600 Subject: [PATCH] ProvisionOpenStack.destroy(): Detach volumes Signed-off-by: Zack Cerza --- teuthology/provision.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teuthology/provision.py b/teuthology/provision.py index 078794375c..2cb8d21e14 100644 --- a/teuthology/provision.py +++ b/teuthology/provision.py @@ -358,6 +358,9 @@ class ProvisionOpenStack(OpenStack): if not self.exists(name_or_id): return True volumes = self.list_volumes(name_or_id) + for volume in volumes: + misc.sh("openstack server remove volume %s %s" % + (name_or_id, volume)) misc.sh("openstack server delete --wait " + name_or_id) for volume in volumes: misc.sh("openstack volume delete " + volume) -- 2.39.5