Project

General

Profile

Bug #43313

telemetry module can crash on entity name with multiple '.' separators

Added by Dan Mick about 1 year ago. Updated 12 months ago.

Status:
Pending Backport
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
nautilus,mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

A user discovered this:

        # ceph telemetry show
        Error EINVAL: Traceback (most recent call last):
          File "/usr/share/ceph/mgr/mgr_module.py", line 914, in _handle_command
            return self.handle_command(inbuf, cmd)
          File "/usr/share/ceph/mgr/telemetry/module.py", line 754, in handle_command
            channels=command.get('channels', None)
          File "/usr/share/ceph/mgr/telemetry/module.py", line 660, in compile_report
            report['crashes'] = self.gather_crashinfo()
          File "/usr/share/ceph/mgr/telemetry/module.py", line 337, in gather_crashinfo
            (etype, eid) = c.get('entity_name', '').split('.')
        ValueError: too many values to unpack

The entity name in question was

client.rgw.stage2-rgw02-object02.s2r6
, which indeed won't split correctly. The fix is to add a max-split count of 1 so that only the first '.' is considered a separator.


Related issues

Copied to mgr - Backport #44057: nautilus: telemetry module can crash on entity name with multiple '.' separators Resolved
Copied to mgr - Backport #44058: mimic: telemetry module can crash on entity name with multiple '.' separators New

History

#1 Updated by Dan Mick about 1 year ago

  • Project changed from Ceph to mgr

#2 Updated by Alexandre Marangone about 1 year ago

Dan, I'm looking into this. I'm not certain on how you expect the crash to look on the server side.
It would be easy to specify a maxsplit of 1 but then the reported entity_name in the crash would be client.$hash. Would it be more useful to get client.<client_type>.$hash?

Also it looks like any radosgw crash would trigger this since the expectation is that there's only 1 dot in the name and the default naming convention for rgw is client.rgw.`hostname -s`

#3 Updated by Dan Mick about 1 year ago

with maxsplit 1:

>>> s='client.rgw.stage2-rgw02-object02.s2r6'
>>> s.split('.', 1)
['client', 'rgw.stage2-rgw02-object02.s2r6']

which is what you want, I think. As for the hash, the point of the hash is to obscure any customer identifiers like hostname or zone name or whatever is stuffed into the name.

#4 Updated by Alexandre Marangone about 1 year ago

Gotcha. I thought it could have been important to identify client type (i.e. rgw) in the entity name

#5 Updated by Sage Weil 12 months ago

  • Priority changed from Normal to Urgent
  • Backport set to nautilus,mimic

#6 Updated by Dan Mick 12 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 33094

#7 Updated by Sage Weil 12 months ago

  • Status changed from Fix Under Review to Pending Backport

#8 Updated by Konstantin Shalygin 12 months ago

  • Copied to Backport #44057: nautilus: telemetry module can crash on entity name with multiple '.' separators added

#9 Updated by Konstantin Shalygin 12 months ago

  • Copied to Backport #44058: mimic: telemetry module can crash on entity name with multiple '.' separators added

Also available in: Atom PDF