Update: new test repositories archives, small fix
* refreshed the k8s/src/ test tools archives
* add clean up orphan fio volumes (not attached)
* updated toolset:latest image paths
Related-PROD: PROD-37187
Change-Id: Ie4986775a3c3d6e3f0e5a95142bfefd272e8f1a9
diff --git a/fio/fio_cleanup.py b/fio/fio_cleanup.py
index 753df87..715e01d 100644
--- a/fio/fio_cleanup.py
+++ b/fio/fio_cleanup.py
@@ -14,6 +14,7 @@
FLAVOR_NAME: Final[str] = conn.FIO_FLAVOR_NAME
KEYPAIR_NAME: Final[str] = conn.FIO_KEYPAIR_NAME
SG_NAME: Final[str] = conn.FIO_SG_NAME
+VOL_NAME_MASK: Final[str] = conn.FIO_VOL_NAME_MASK
ROUTER_NAME: Final[str] = conn.FIO_ROUTER_NAME
NET_NAME: Final[str] = conn.FIO_NET_NAME
@@ -36,13 +37,13 @@
" server.")
conn.delete_volume(vol)
print(f"'{vol.id}' volume has been deleted.")
- conn.delete_server(vm)
- print(f"'{vm.name}' server has been deleted.")
except ResourceFailure as e:
print(
f"Cleanup of '{vm.id}' with volume '{vol.id}' attached "
f"failed with '{e.message}' error.")
conn.delete_volume(vol)
+ conn.delete_server(vm)
+ print(f"'{vm.name}' server has been deleted.")
if __name__ == "__main__":
@@ -92,6 +93,13 @@
network.delete_security_group(sg)
print(f"fio '{sg.id}' security group has been deleted.")
+ # Delete the orphan fio volumes which are not attached (if any)
+ volumes = volume.volumes(VOL_NAME_MASK)
+ for v in volumes:
+ if not v.attachments:
+ volume.delete_volume(v.id)
+ print(f"'{v.id}' volume has been deleted.")
+
# Delete fio server group
server_group = compute.find_server_group(
AA_SERVER_GROUP_NAME, all_projects=True)