mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
Merge PR #43894 into master
* refs/pull/43894/head: qa/suites/orch/cephadm: verify that 'orch ls' reports OSDs properly mgr/cephadm: show unmanaged OSDs under 'osd' service Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
This commit is contained in:
commit
22871aa2e0
@ -8,6 +8,7 @@ tasks:
|
||||
- ceph orch ls
|
||||
- ceph orch host ls
|
||||
- ceph orch device ls
|
||||
- ceph orch ls | grep '^osd.all-available-devices '
|
||||
roles:
|
||||
- - host.a
|
||||
- client.0
|
||||
|
@ -6,3 +6,4 @@ tasks:
|
||||
- ceph orch ls
|
||||
- ceph orch host ls
|
||||
- ceph orch device ls
|
||||
- ceph orch ls | grep '^osd.all-available-devices '
|
||||
|
@ -12,3 +12,4 @@ tasks:
|
||||
- ceph orch host ls
|
||||
- ceph orch device ls
|
||||
- ceph orch ls --format yaml
|
||||
- ceph orch ls | grep '^osd '
|
||||
|
@ -11,3 +11,4 @@ tasks:
|
||||
- ceph versions
|
||||
- ceph versions | jq -e '.overall | length == 1'
|
||||
- ceph versions | jq -e '.overall | keys' | grep $sha1
|
||||
- ceph orch ls | grep '^osd '
|
||||
|
@ -905,7 +905,7 @@ class DaemonDescription(object):
|
||||
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
|
||||
@ -1051,6 +1051,15 @@ class DaemonDescription(object):
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user