From 27c0b6430b0d4757582c16a541f9dfc4213baeaa Mon Sep 17 00:00:00 2001 From: deepssin Date: Thu, 25 Sep 2025 07:22:32 -0400 Subject: [PATCH] Fix: handle attached_volumes field when fetching volumes from openstack Some clouds use attached_volumes instead of os-extended-volumes:volumes_attached --- teuthology/openstack/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/teuthology/openstack/__init__.py b/teuthology/openstack/__init__.py index 54973cfd1..11d8ff150 100644 --- a/teuthology/openstack/__init__.py +++ b/teuthology/openstack/__init__.py @@ -128,8 +128,12 @@ def get_volumes(self): Return the uuid of the volumes attached to the name_or_id OpenStack instance. """ - volumes = self['os-extended-volumes:volumes_attached'] - return [volume['id'] for volume in volumes ] + info = self.info or {} + vols = (info.get('os-extended-volumes:volumes_attached') + or info.get('attached_volumes') + or []) + volumes = [v['id'] for v in vols if isinstance(v, dict) and 'id' in v] + return volumes def get_addresses(self): """