From ab762a57dfc64d0584bc4763f7d0681a3a4d4e43 Mon Sep 17 00:00:00 2001 From: hector-baez Date: Wed, 29 Nov 2023 10:25:40 -0600 Subject: [PATCH] fix volume id parsing --- main/dismantle_instance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/dismantle_instance.sh b/main/dismantle_instance.sh index 0cdff7d..a4eaa2f 100755 --- a/main/dismantle_instance.sh +++ b/main/dismantle_instance.sh @@ -36,7 +36,7 @@ fi source ${JSCRED} # get volume id -volume_id=$(openstack server show blast00 -c volumes_attached -f json | jq -r '.volumes_attached | split("=")[1]') +volume_id=$(openstack server show $NAME -c volumes_attached -f json | jq -r '.volumes_attached[0].id') # get corresponding ip address ip_address=$(grep -A 5 $NAME $SSHCONFIG | grep "HostName" | awk '{print $2}') # remove IP from instance