mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
qa/tasks/cephfs/test_nfs: wait for fs to come up before exporting
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
bdad93759b
commit
d7acc16860
@ -6,6 +6,7 @@ import logging
|
||||
from io import BytesIO
|
||||
|
||||
from tasks.mgr.mgr_test_case import MgrTestCase
|
||||
from teuthology import contextutil
|
||||
from teuthology.exceptions import CommandFailedError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -153,6 +154,15 @@ class TestNFS(MgrTestCase):
|
||||
'''
|
||||
if create_fs:
|
||||
self._cmd('fs', 'volume', 'create', self.fs_name)
|
||||
with contextutil.safe_while(sleep=5, tries=30) as proceed:
|
||||
while proceed():
|
||||
output = self._cmd(
|
||||
'orch', 'ls', '-f', 'json',
|
||||
'--service-name', f'mds.{self.fs_name}'
|
||||
)
|
||||
j = json.loads(output)
|
||||
if j[0]['status']['running']:
|
||||
break
|
||||
export_cmd = ['nfs', 'export', 'create', 'cephfs', self.fs_name, self.cluster_id]
|
||||
if isinstance(extra_cmd, list):
|
||||
export_cmd.extend(extra_cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user