Skip to content

Commit

Permalink
Refresh kernel partition table between tests (#779)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lmlg and lmlg authored Jun 9, 2022
1 parent 251d6a8 commit 3ab81b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zaza/openstack/charm_tests/ceph/iscsi/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ def create_ec_data_pool(self):
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.
Expand All @@ -254,6 +258,7 @@ def run_client_checks(self, test_ctxt):
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."""
Expand Down

0 comments on commit 3ab81b4

Please sign in to comment.