]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/influx: Only split string on first occurence of dot (.) 21795/head
authorWido den Hollander <wido@42on.com>
Thu, 3 May 2018 10:11:58 +0000 (12:11 +0200)
committerWido den Hollander <wido@42on.com>
Thu, 3 May 2018 13:53:46 +0000 (15:53 +0200)
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 <wido@42on.com>
src/pybind/mgr/influx/module.py

index 3bcc91cb2bdf3a5a5e342bd6cb308fb7f3caafba..999902620ad06cf36fdb0e70f9e266c7fdcb2786 100644 (file)
@@ -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():