]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: remove `config` from Filesystem cons
authorJohn Spray <jspray@redhat.com>
Tue, 23 Dec 2014 16:11:12 +0000 (16:11 +0000)
committerJohn Spray <jspray@redhat.com>
Fri, 9 Jan 2015 10:09:53 +0000 (10:09 +0000)
This was only used in get_first_mon, which doesn't actually
need the parameter itself.  Makes it easier to casually
use Filesystem from any place with a ctx to hand.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/ceph.py
tasks/cephfs/filesystem.py
tasks/mds_auto_repair.py
tasks/mds_client_limits.py
tasks/mds_client_recovery.py
tasks/mds_flush.py
tasks/mds_full.py
tasks/mds_journal_migration.py

index 42fc691e343a162bcc8dd93e75b1350feb74b703..d8366fa0ba263795351fb3dd463f3361fef442df 100644 (file)
@@ -176,7 +176,7 @@ def cephfs_setup(ctx, config):
         if metadata_pool_exists:
             log.info("Metadata pool already exists, skipping")
         else:
-            ceph_fs = Filesystem(ctx, config)
+            ceph_fs = Filesystem(ctx)
             ceph_fs.create()
 
         is_active_mds = lambda role: role.startswith('mds.') and not role.endswith('-s') and role.find('-s-') == -1
index 46ad3ab7ba2c02fe46774b10c4f1514aeac452ff..bbc23ac7017ebeaf97e2113fa463d021cc28fd0d 100644 (file)
@@ -38,15 +38,14 @@ class Filesystem(object):
      * Assume a single filesystem+cluster
      * Assume a single MDS
     """
-    def __init__(self, ctx, config):
+    def __init__(self, ctx):
         self._ctx = ctx
-        self._config = config
 
         self.mds_ids = list(misc.all_roles_of_type(ctx.cluster, 'mds'))
         if len(self.mds_ids) == 0:
             raise RuntimeError("This task requires at least one MDS")
 
-        first_mon = misc.get_first_mon(ctx, config)
+        first_mon = misc.get_first_mon(ctx, None)
         (self.mon_remote,) = ctx.cluster.only(first_mon).remotes.iterkeys()
         self.mon_manager = ceph_manager.CephManager(self.mon_remote, ctx=ctx, logger=log.getChild('ceph_manager'))
         self.mds_daemons = dict([(mds_id, self._ctx.daemons.get_daemon('mds', mds_id)) for mds_id in self.mds_ids])
index 586bf05238446050fa02a29ff8b7fb7bd8146b34..9ac0a08880155377d46abfe27840228323a2a1ca 100644 (file)
@@ -106,7 +106,7 @@ class TestMDSAutoRepair(CephFSTestCase):
 
 @contextlib.contextmanager
 def task(ctx, config):
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
     mount_a = ctx.mounts.values()[0]
 
     # Stash references on ctx so that we can easily debug in interactive mode
index 2bd12f1a29f87759e251a10b258d3b359230f6d1..ae72288675342507067f5e9024bfbcb4b2d44ba0 100644 (file)
@@ -151,7 +151,7 @@ class TestClientLimits(CephFSTestCase):
 
 @contextlib.contextmanager
 def task(ctx, config):
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
 
     # Pick out the clients we will use from the configuration
     # =======================================================
index 29138ba99d367aa95802ae2cdff97419498c9fbb..7dd7402e8e82949ddee87aa83488811fb1abe0dc 100644 (file)
@@ -383,7 +383,7 @@ def task(ctx, config):
     - An outer ceph_fuse task with at least two clients
     - That the clients are on a separate host to the MDS
     """
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
 
     # Pick out the clients we will use from the configuration
     # =======================================================
index c10baec6e3c12fe64186f565e28e305fcb071737..46c8a69b2f513afcb7acce5d05b6cf4203ca88fd 100644 (file)
@@ -79,7 +79,7 @@ class TestFlush(CephFSTestCase):
 
 @contextlib.contextmanager
 def task(ctx, config):
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
 
     # Pick out the clients we will use from the configuration
     # =======================================================
index f77b78500a1c3ca2741cc584a4f2219af15e60bc..c984d1a9bf762a1baf406f439d27c7309a710859 100644 (file)
@@ -337,7 +337,7 @@ class TestClusterFull(CephFSTestCase):
 
 @contextlib.contextmanager
 def task(ctx, config):
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
 
     # Pick out the clients we will use from the configuration
     # =======================================================
index d10982d5ffc289b74818e52444e21ff1dc20ccb5..992186e67c598c9179198355223094275b1791b4 100644 (file)
@@ -50,7 +50,7 @@ def task(ctx, config):
         except IndexError:
             raise RuntimeError("This task requires at least one client")
 
-    fs = Filesystem(ctx, config)
+    fs = Filesystem(ctx)
     ctx.fs = fs
     old_journal_version = JOURNAL_FORMAT_LEGACY
     new_journal_version = JOURNAL_FORMAT_RESILIENT