From: Wido den Hollander Date: Thu, 3 May 2018 10:11:58 +0000 (+0200) Subject: mgr/influx: Only split string on first occurence of dot (.) X-Git-Tag: v13.1.1~56^2~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21795%2Fhead;p=ceph.git mgr/influx: Only split string on first occurence of dot (.) Service names are not always osd.X or mon.X, they might be rgw.radosgw.rgw1 This would lead to: Unhandled exception from module 'influx' while running on mgr.mon01: too many values to unpack Only split on the first dot as the rest is the service name Fixes: http://tracker.ceph.com/issues/23996 Signed-off-by: Wido den Hollander --- diff --git a/src/pybind/mgr/influx/module.py b/src/pybind/mgr/influx/module.py index 3bcc91cb2bdf..999902620ad0 100644 --- a/src/pybind/mgr/influx/module.py +++ b/src/pybind/mgr/influx/module.py @@ -189,7 +189,7 @@ class Module(MgrModule): now = datetime.utcnow().isoformat() + 'Z' for daemon, counters in self.get_all_perf_counters().iteritems(): - svc_type, svc_id = daemon.split(".") + svc_type, svc_id = daemon.split(".", 1) metadata = self.get_metadata(svc_type, svc_id) for path, counter_info in counters.items():