From 5d8dadfb5c989184cc6c7ab6ce5a1324d1d06c58 Mon Sep 17 00:00:00 2001 From: Li Ning Date: Fri, 15 Jun 2018 17:10:24 +0800 Subject: [PATCH] Active manager is required as Ceph upgrades. Also fix a bug when calls translate_to_id() function. Signed-off-by: Li Ning --- deploy/mod/deploy.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deploy/mod/deploy.py b/deploy/mod/deploy.py index 7f877da..108c281 100644 --- a/deploy/mod/deploy.py +++ b/deploy/mod/deploy.py @@ -95,7 +95,7 @@ def __init__(self, tunings=""): self.cluster["mdss"][mds] = ip_handler.getIpByHostInSubnet(mds) for osd in self.cluster["osds"]: - devices_id = self.translate_to_id(self.all_conf_data.get_list(osd)) + devices_id = self.translate_to_id(osd, self.all_conf_data.get_list(osd)) self.cluster[osd] = devices_id self.cluster["fs"] = "xfs" @@ -917,11 +917,8 @@ def start_mgr(self, force=False): formatted_outStr = common.format_pdsh_return(outStr) ceph_status = formatted_outStr[head] #outList = [x.strip() for x in outStr.split('\n')] - if "no active mgr" in outStr: - common.pdsh(user, [head], "ceph auth get-or-create mgr.admin mon 'allow *' && ceph-mgr -i %s" % ceph_status["fsid"], option="console") - common.printout("LOG", "create mgr success: admin") - else: - common.printout("LOG", "not need create mgr") + common.pdsh(user, [head], "ceph auth get-or-create mgr.$name mon 'allow profile mgr' osd 'allow *' mds 'allow *' && ceph-mgr -i %s" % ceph_status["fsid"], option="console") + common.printout("LOG", "create mgr success: admin") def osd_perf_reset(self): osd_list = self.get_daemon_info_from_ceph_conf("osd")