mirror of
https://github.com/ceph/ceph
synced 2026-08-03 07:22:20 +00:00
mgr/cephadm: verify spec service_id before applying
There are scenarios where the wrong spec is applied to the wrong OSDs, likely due to some unknown process interruption or corruption of cache data, to mitigate this issue I added a check for OSDs service_id to match the spec service_id. Fixes: https://tracker.ceph.com/issues/74885 Signed-off-by: Timothy Q Nguyen <timqn22@gmail.com>
This commit is contained in:
parent
627d6cb11d
commit
fbe3a053c2
@ -126,6 +126,9 @@ class OSDService(CephService):
|
||||
if osd['tags']['ceph.cluster_fsid'] != fsid:
|
||||
logger.debug('mismatched fsid, skipping %s' % osd)
|
||||
continue
|
||||
if osd['tags']['ceph.osdspec_affinity'] != spec.service_id:
|
||||
logger.debug('mismatched service id, skipping %s' % osd)
|
||||
continue
|
||||
if osd_id in before_osd_uuid_map and osd_id not in replace_osd_ids:
|
||||
# if it exists but is part of the replacement operation, don't skip
|
||||
continue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user