Skip to content

Commit

Permalink
mgr/influx: Only split string on first occurence of dot (.)
Browse files Browse the repository at this point in the history
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

Signed-off-by: Wido den Hollander <wido@42on.com>
  • Loading branch information
wido committed May 3, 2018
1 parent 8b447a7 commit da1c45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pybind/mgr/influx/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_daemon_stats(self):
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():
Expand Down

0 comments on commit da1c45a

Please sign in to comment.