]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: wait for daemons to come up via cephadm 39969/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 9 Mar 2021 21:54:34 +0000 (13:54 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Sun, 21 Mar 2021 17:35:07 +0000 (10:35 -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>
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 b4f3e3a16071a7da18cb0fbc1eb3b5b68ebbf8e2..71d7b22e814620e168dcb0e04d6bd9beb0871d12 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.