From 6f87be2b5f8515d95cd4d9dfdc9460aa02dec43d Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Thu, 25 Apr 2024 18:18:51 -0300 Subject: [PATCH] Filter master MDS client --- zaza/openstack/charm_tests/ceph/tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 9b5e995..27ad297 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1812,6 +1812,13 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest): return None return next(iter(ret))[0] + def _get_fs_client(self, unit): + ret = self._get_all_keys(unit, lambda x: (x.startswith('mds.') and + x != 'mds.ceph-fs')) + if not ret: + return None + return next(iter(ret))[0] + def test_key_rotate(self): """Test that rotating the keys actually changes them.""" unit = 'ceph-mon/0' @@ -1829,7 +1836,7 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest): try: zaza_model.get_application('ceph-fs') - fs_svc = self._get_all_keys(unit, lambda x: x.startswith('mds.')) + fs_svc = self._get_fs_client(unit) if fs_svc is not None: # Only wait for ceph-fs, as this model includes 'ubuntu' # units, and those don't play nice with zaza (they don't