]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: remove parameter createfs from mount classes
authorRishabh Dave <ridave@redhat.com>
Fri, 19 Feb 2021 16:03:45 +0000 (21:33 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 4 May 2023 13:19:34 +0000 (18:49 +0530)
It's better to get rid of this paramter since it doesn't actually create
any new Ceph file system.

Fixes: https://tracker.ceph.com/issues/59626
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit db0b85b44076ef952ca71033f3b5b819b8d768af)

qa/tasks/cephfs/fuse_mount.py
qa/tasks/cephfs/kernel_mount.py
qa/tasks/cephfs/mount.py
qa/tasks/vstart_runner.py

index 5c5d1c85c0ca893b72648406510f18c2970a8941..3bd759da82e5fce976be5f1a461549afaed1ad20 100644 (file)
@@ -31,18 +31,12 @@ class FuseMount(CephFSMount):
         self.inst = None
         self.addr = None
 
-    def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
+    def mount(self, mntopts=[], check_status=True, **kwargs):
         self.update_attrs(**kwargs)
         self.assert_and_log_minimum_mount_details()
 
         self.setup_netns()
 
-        if createfs:
-            # TODO: don't call setupfs() from within mount(), since it's
-            # absurd. The proper order should be: create FS first and then
-            # call mount().
-            self.setupfs(name=self.cephfs_name)
-
         try:
             return self._mount(mntopts, check_status)
         except RuntimeError:
index faf0aa19b86f04af8df0050abb1de867e4f299b0..21be0c28710ab866a2edce1ad86b23374b54e893 100644 (file)
@@ -34,17 +34,12 @@ class KernelMount(CephFSMount):
         self.inst = None
         self.addr = None
 
-    def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
+    def mount(self, mntopts=[], check_status=True, **kwargs):
         self.update_attrs(**kwargs)
         self.assert_and_log_minimum_mount_details()
 
         self.setup_netns()
 
-        # TODO: don't call setupfs() from within mount(), since it's
-        # absurd. The proper order should be: create FS first and then
-        # call mount().
-        if createfs:
-            self.setupfs(name=self.cephfs_name)
         if not self.cephfs_mntpt:
             self.cephfs_mntpt = '/'
 
index a24fd284aaae762011b05b9d12482d6cd292c1ec..eb1eea3f13ffde9d1a078ab916287fd974fbea13 100644 (file)
@@ -395,7 +395,7 @@ class CephFSMount(object):
         args = ['sudo', 'ip', 'link', 'set', 'brx.{0}'.format(self.nsid), 'up']
         self.client_remote.run(args=args, timeout=(5*60), omit_sudo=False)
 
-    def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
+    def mount(self, mntopts=[], check_status=True, **kwargs):
         """
         kwargs expects its members to be same as the arguments accepted by
         self.update_attrs().
@@ -469,22 +469,19 @@ class CephFSMount(object):
         2. Run update_attrs().
         3. Run mount().
 
-        Accepts arguments of self.mount() and self.update_attrs() with 2 exceptions -
-        1. Accepts wait too which can be True or False.
-        2. The default value of createfs is False.
+        Accepts arguments of self.mount() and self.update_attrs() with 1
+        exception: wait accepted too which can be True or False.
         """
         self.umount_wait()
         assert not self.mounted
 
         mntopts = kwargs.pop('mntopts', [])
-        createfs = kwargs.pop('createfs', False)
         check_status = kwargs.pop('check_status', True)
         wait = kwargs.pop('wait', True)
 
         self.update_attrs(**kwargs)
 
-        retval = self.mount(mntopts=mntopts, createfs=createfs,
-                            check_status=check_status)
+        retval = self.mount(mntopts=mntopts, check_status=check_status)
         # avoid this scenario (again): mount command might've failed and
         # check_status might have silenced the exception, yet we attempt to
         # wait which might lead to an error.
index db0cb41cf15c32177eeec5566a8fc90cf453dfd8..c88c93b80ec01f5d1d4d1cf6f69fcb6d1bd870ef 100644 (file)
@@ -667,7 +667,7 @@ class LocalKernelMount(KernelMount):
         path = "{0}/client.{1}.*.asok".format(d, self.client_id)
         return path
 
-    def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
+    def mount(self, mntopts=[], check_status=True, **kwargs):
         self.update_attrs(**kwargs)
         self.assert_and_log_minimum_mount_details()
 
@@ -679,9 +679,6 @@ class LocalKernelMount(KernelMount):
 
         if not self.cephfs_mntpt:
             self.cephfs_mntpt = "/"
-        # TODO: don't call setupfs() from within mount()
-        if createfs:
-            self.setupfs(name=self.cephfs_name)
 
         opts = 'norequire_active_mds'
         if self.client_id:
@@ -801,7 +798,7 @@ class LocalFuseMount(FuseMount):
         path = "{0}/client.{1}.*.asok".format(d, self.client_id)
         return path
 
-    def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
+    def mount(self, mntopts=[], check_status=True, **kwargs):
         self.update_attrs(**kwargs)
         self.assert_and_log_minimum_mount_details()
 
@@ -811,10 +808,6 @@ class LocalFuseMount(FuseMount):
         else:
             self.using_namespace = False
 
-        # TODO: don't call setupfs() from within mount()
-        if createfs:
-            self.setupfs(name=self.cephfs_name)
-
         stderr = StringIO()
         try:
             self.client_remote.run(args=['mkdir', '-p', self.hostfs_mntpt],