Only match OSDs we see that didn't exist before we ran c-v prepare.
This might include other OSDs created by a racing c-v incantation, but (1)
we shouldn't have any of those, and (2) even if they were, the OSD is new
and should be added.
Signed-off-by: Sage Weil <sage@redhat.com>
# Conflicts:
# src/pybind/mgr/cephadm/module.py
'keyring': keyring,
})
+ before_osd_uuid_map = self.get_osd_uuid_map()
+
split_cmd = cmd.split(' ')
_cmd = ['--config-and-keyring', '-', '--']
_cmd.extend(split_cmd)
if osd['tags']['ceph.cluster_fsid'] != fsid:
self.log.debug('mismatched fsid, skipping %s' % osd)
continue
+ if osd_id in before_osd_uuid_map:
+ # this osd existed before we ran prepare
+ continue
if osd_id not in osd_uuid_map:
self.log.debug('osd id %d does not exist in cluster' % osd_id)
continue