]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: don't add `ceph-volume lvm activate` for adopted simple OSDs 36463/head
authorTim Serong <tserong@suse.com>
Wed, 5 Aug 2020 06:34:20 +0000 (16:34 +1000)
committerTim Serong <tserong@suse.com>
Wed, 5 Aug 2020 06:55:25 +0000 (16:55 +1000)
commit8112949851eb4849f0d559a118739d92051dcf8e
tree6677025e1bac17ef2a2d1183e4a601ba5d227fde
parent8c203e7eac2a5eec568eec16d219384e1c270e9c
cephadm: don't add `ceph-volume lvm activate` for adopted simple OSDs

This changes the logic in deploy_daemon_units() to add either `chown` calls
for simple (ceph-disk style) OSDs, or to add `ceph-volume lvm activate` calls
for LVM OSDs, rather than always adding both.  When I was working on
https://github.com/ceph/ceph/pull/34703, I'd originally added an "osd_simple"
flag to figure out what type of OSD was being adopted/deployed, but passing
that around was kinda ugly, so was removed from that PR.  This time around
I'm checking if /etc/ceph/osd/$OSD_ID-$OSD_FSID.json.adopted-by-cephadm
exists, which seems pretty safe IMO.  My only concern with this method is:
what happens if someone adopts a simple OSD, then later wants to migrate it
to LVM.  Presumably that's a destroy and recreate, keeping the same OSD ID?
If that's true, then the JSON file probably still exists, so the subsequent
create will do the wrong thing, i.e. will add `chown` calls, not `ceph-volume
lvm activate` calls.  Any/all feedback appreciated...

Fixes: https://tracker.ceph.com/issues/46833
Signed-off-by: Tim Serong <tserong@suse.com>
src/cephadm/cephadm