From 3ab81b4ebb193f01ff4f2ef7e7dd11bbe6921976 Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Thu, 9 Jun 2022 11:58:37 -0300 Subject: [PATCH] Refresh kernel partition table between tests (#779) The test suite for ceph-iscsi does a bunch of operations on filesystems in quick succession, so some tests are prone to fail if the kernel doesn't update the partition table. This PR does this manually between tests by calling the 'partprobe' command. Co-authored-by: Luciano Lo Giudice --- zaza/openstack/charm_tests/ceph/iscsi/tests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zaza/openstack/charm_tests/ceph/iscsi/tests.py b/zaza/openstack/charm_tests/ceph/iscsi/tests.py index c64b081..9a829bc 100644 --- a/zaza/openstack/charm_tests/ceph/iscsi/tests.py +++ b/zaza/openstack/charm_tests/ceph/iscsi/tests.py @@ -238,6 +238,10 @@ class CephISCSIGatewayTest(test_utils.BaseCharmTest): action_params={ 'name': self.EC_METADATA_POOL})) + def refresh_partitions(self, ctxt): + """Refresh kernel partition tables in client.""" + self.run_commands(ctxt['client_entity_id'], ('partprobe', ), ctxt) + def run_client_checks(self, test_ctxt): """Check access to mulipath device. @@ -254,6 +258,7 @@ class CephISCSIGatewayTest(test_utils.BaseCharmTest): self.logout_iscsi_targets(test_ctxt) self.login_iscsi_target(test_ctxt) self.check_client_device(test_ctxt, init_client=False) + self.refresh_partitions(test_ctxt) def test_create_and_mount_volume(self): """Test creating a target and mounting it on a client."""