]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: wait for daemons to come up via cephadm 40528/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 9 Mar 2021 21:54:34 +0000 (13:54 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 31 Mar 2021 14:29:55 +0000 (07:29 -0700)
Rather than waiting for a set amount of time.

Fixes: https://tracker.ceph.com/issues/49684
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d06689e16e3264b21b33326db5e328faef0da799)

qa/suites/fs/cephadm/multivolume/0-start.yaml
qa/tasks/fs.py

index 4e832878ad2070f81d31fecc54b132f6eb0af9d9..13dc863d2936001a56754815390b6e1837e2fcde 100644 (file)
@@ -35,5 +35,5 @@ tasks:
     host.a:
       - ceph fs volume create foo
       - ceph fs volume create bar
-- sleep:
-    interval: 60
+- fs.ready:
+    timeout: 300
index 4f7a3e2060b6cb7525a7fdc59ed9dc7448640b67..1a6cfcfb38267645cc13f9f5646e7496e18b621c 100644 (file)
@@ -5,10 +5,29 @@ CephFS sub-tasks.
 import logging
 import re
 
-from tasks.cephfs.filesystem import Filesystem
+from tasks.cephfs.filesystem import Filesystem, MDSCluster
 
 log = logging.getLogger(__name__)
 
+def ready(ctx, config):
+    """
+    That the file system is ready for clients.
+    """
+
+    if config is None:
+        config = {}
+    assert isinstance(config, dict), \
+        'task only accepts a dict for configuration'
+
+    timeout = config.get('timeout', 300)
+
+    mdsc = MDSCluster(ctx)
+    status = mdsc.status()
+
+    for filesystem in status.get_filesystems():
+        fs = Filesystem(ctx, fscid=filesystem['id'])
+        fs.wait_for_daemons(timeout=timeout, status=status)
+
 def clients_evicted(ctx, config):
     """
     Check clients are evicted, unmount (cleanup) if so.