Prepared fixed for the MOS Yoga-based image, MOS 23.2
The list of the fixes / improvements:
* Dockerfiles: set the FROM image to the Mirantis heat
Yoga image of MOS 23.2. Fixed some packages installation.
* Python cleanup.py script: re-wrote opertions with the
volume groups with the specific API version, resettings
volume status, finding the server groups. Added the
functions for non-existing methods in downstream
openstacksdk.
* FIO scripts: Fixed the attaching/detaching the volumes,
some other fixes.
* Fixed e2e sctipt to find the hypervisor.
* Refreshed the si-tests, mos-spt repositories, archived.
Change-Id: I1153ebcf3691cc43eb3fc0a7e98a0d88da3a8154
diff --git a/fio/fio_cleanup.py b/fio/fio_cleanup.py
index 753df87..933959f 100644
--- a/fio/fio_cleanup.py
+++ b/fio/fio_cleanup.py
@@ -30,19 +30,19 @@
vol_id = att.volume_id
vol = volume.get_volume(vol_id)
try:
- conn.detach_volume(vm, vol)
+ conn.detach_volume(att, vm, vol)
print(
f"'{vol.id}' volume has been detached from fio '{vm.name}'"
" 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__":
@@ -59,11 +59,12 @@
router = network.find_router(ROUTER_NAME)
if router:
network.update_router(router.id, external_gateway_info={})
- print("Externa GW port has been deleted from fio router.")
+ print("External GW port has been deleted from fio router.")
router_ports = network.ports(device_id=router.id)
for p in router_ports:
- network.remove_interface_from_router(router.id, port_id=p.id)
- print(f"'{p.id}' port has been deleted from fio router.")
+ if p.device_owner != "network:router_ha_interface":
+ network.remove_interface_from_router(router.id, port_id=p.id)
+ print(f"'{p.id}' port has been deleted from fio router.")
# Delete fio network topology
net = network.find_network(NET_NAME)
@@ -93,8 +94,7 @@
print(f"fio '{sg.id}' security group has been deleted.")
# Delete fio server group
- server_group = compute.find_server_group(
- AA_SERVER_GROUP_NAME, all_projects=True)
+ server_group = conn.find_server_group(AA_SERVER_GROUP_NAME)
if server_group:
compute.delete_server_group(server_group)
print(f"fio '{server_group.name}' server group has been deleted.")