1- If the unit.meta file service_name = osd.NNN (which is true for lots of
OSDs deployed on older version of cephadm) then ignore the field entirely.
2- If an OSD has not service_name (see above) then show it under the 'osd'
service (instead of 'osd.unmanaged').
Sample 'ceph orch ls' output with a drivegroup + unmanaged OSD:
NAME PORTS RUNNING REFRESHED AGE PLACEMENT
...
osd 1 85s ago - <unmanaged>
osd.hdds 5 85s ago 2s *
...
Fixes: https://tracker.ceph.com/issues/53235
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit
f13a3e5b3ca1547bba9deae3615252165bc7cac9)
if self.daemon_type == 'osd':
if self.osdspec_affinity and self.osdspec_affinity != 'None':
return self.osdspec_affinity
- return 'unmanaged'
+ return ''
def _match() -> str:
assert self.daemon_id is not None
status_int = c.pop('status', None)
if 'daemon_name' in c:
del c['daemon_name']
+ if 'service_name' in c and c['service_name'].startswith('osd.'):
+ # if the service_name is a osd.NNN (numeric osd id) then
+ # ignore it -- it is not a valid service_name and
+ # (presumably) came from an older version of cephadm.
+ try:
+ int(c['service_name'][4:])
+ del c['service_name']
+ except ValueError:
+ pass
status = DaemonDescriptionStatus(status_int) if status_int is not None else None
return cls(events=events, status=status, **c)