]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge remote-tracking branch 'origin/wip-global-config' into greg-fs-testing
authorGreg Farnum <gfarnum@redhat.com>
Tue, 19 Jan 2016 00:06:02 +0000 (16:06 -0800)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 19 Jan 2016 00:06:02 +0000 (16:06 -0800)
https://github.com/ceph/ceph-qa-suite/pull/784

Conflicts:
tasks/cephfs/vstart_runner.py
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
1  2 
tasks/cephfs/vstart_runner.py

index 5242c44a653ea84dec6a5a191eb6472f4569f0ee,bc49ad90f6a7c3ed15df8c32d7dae09cfcb4ac1f..b8ab079d41fecdad6fa4207817792c2f80bfc330
@@@ -35,7 -35,7 +35,8 @@@ import errn
  from unittest import suite
  import unittest
  from teuthology.orchestra.run import Raw, quote
 +from teuthology.orchestra.daemon import DaemonGroup
+ from teuthology.config import config as teuth_config
  
  import logging
  
@@@ -721,23 -697,8 +724,21 @@@ def exec_test()
      class LocalContext(object):
          def __init__(self):
              self.config = {}
-             self.teuthology_config = {
-                 'test_path': test_dir
-             }
+             self.teuthology_config = teuth_config
              self.cluster = LocalCluster()
 +            self.daemons = DaemonGroup()
 +
 +            # Shove some LocalDaemons into the ctx.daemons DaemonGroup instance so that any
 +            # tests that want to look these up via ctx can do so.
 +            # Inspect ceph.conf to see what roles exist
 +            for conf_line in open("ceph.conf").readlines():
 +                for svc_type in ["mon", "osd", "mds"]:
 +                    if svc_type not in self.daemons.daemons:
 +                        self.daemons.daemons[svc_type] = {}
 +                    match = re.match("^\[{0}\.(.+)\]$".format(svc_type), conf_line)
 +                    if match:
 +                        svc_id = match.group(1)
 +                        self.daemons.daemons[svc_type][svc_id] = LocalDaemon(svc_type, svc_id)
  
          def __del__(self):
              shutil.rmtree(self.teuthology_config['test_path'])