From 043049f6c34de1b426e29d7d711cc2e5851e2ba5 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 14 Oct 2015 02:15:07 +0100 Subject: [PATCH] tasks/cephfs: add a wait_for_daemons ...to avoid trying to mount a client before the daemons are ready Signed-off-by: John Spray --- tasks/cephfs/test_data_scan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/cephfs/test_data_scan.py b/tasks/cephfs/test_data_scan.py index 6335bb4c20c0f..26d90e53953b6 100644 --- a/tasks/cephfs/test_data_scan.py +++ b/tasks/cephfs/test_data_scan.py @@ -344,6 +344,7 @@ class TestDataScan(CephFSTestCase): # Start the MDS self.fs.mds_restart() + self.fs.wait_for_daemons() # Mount a client self.mount_a.mount() @@ -435,6 +436,7 @@ class TestDataScan(CephFSTestCase): # Start filesystem back up, observe that the file appears to be gone in an `ls` self.fs.mds_restart() + self.fs.wait_for_daemons() self.mount_a.mount() self.mount_a.wait_until_mounted() files = self.mount_a.run_shell(["ls", "subdir/"]).stdout.getvalue().strip().split("\n") @@ -454,6 +456,7 @@ class TestDataScan(CephFSTestCase): # Start the filesystem and check that the dentry we deleted is now once again visible # and points to the correct file data. self.fs.mds_restart() + self.fs.wait_for_daemons() self.mount_a.mount() self.mount_a.wait_until_mounted() out = self.mount_a.run_shell(["sudo", "cat", "subdir/{0}".format(victim_dentry)]).stdout.getvalue().strip() -- 2.39.5