qa: fix vstart_runner --create for mgr tests

Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2017-03-29 11:00:48 -04:00
parent 838f66269f
commit 8ea98b4cbf

View File

@ -672,9 +672,6 @@ class LocalMDSCluster(LocalCephCluster, MDSCluster):
super(LocalMDSCluster, self).__init__(ctx)
self.mds_ids = ctx.daemons.daemons['mds'].keys()
if not self.mds_ids:
raise RuntimeError("No MDSs found in ceph.conf!")
self.mds_daemons = dict([(id_, LocalDaemon("mds", id_)) for id_ in self.mds_ids])
def clear_firewall(self):
@ -690,9 +687,6 @@ class LocalMgrCluster(LocalCephCluster, MgrCluster):
super(LocalMgrCluster, self).__init__(ctx)
self.mgr_ids = ctx.daemons.daemons['mgr'].keys()
if not self.mgr_ids:
raise RuntimeError("No manager daemonss found in ceph.conf!")
self.mgr_daemons = dict([(id_, LocalDaemon("mgr", id_)) for id_ in self.mgr_ids])
@ -811,14 +805,17 @@ def scan_tests(modules):
max_required_mds = 0
max_required_clients = 0
max_required_mgr = 0
for suite, case in enumerate_methods(overall_suite):
max_required_mds = max(max_required_mds,
getattr(case, "MDSS_REQUIRED", 0))
max_required_clients = max(max_required_clients,
getattr(case, "CLIENTS_REQUIRED", 0))
max_required_mgr = max(max_required_mgr,
getattr(case, "REQUIRE_MGRS", 0))
return max_required_mds, max_required_clients
return max_required_mds, max_required_clients, max_required_mgr
class LocalCluster(object):
@ -880,7 +877,7 @@ def exec_test():
log.error("Some ceph binaries missing, please build them: {0}".format(" ".join(missing_binaries)))
sys.exit(-1)
max_required_mds, max_required_clients = scan_tests(modules)
max_required_mds, max_required_clients, max_required_mgr = scan_tests(modules)
remote = LocalRemote()
@ -906,7 +903,7 @@ def exec_test():
vstart_env["FS"] = "0"
vstart_env["MDS"] = max_required_mds.__str__()
vstart_env["OSD"] = "1"
vstart_env["MGR"] = "1"
vstart_env["MGR"] = max(max_required_mgr, 1).__str__()
remote.run([os.path.join(SRC_PREFIX, "vstart.sh"), "-n", "-d", "--nolockdep"],
env=vstart_env)