Skip to content

cephadm: don't add "ceph-volume lvm activate" for adopted simple OSDs - #36463

Merged
sebastian-philipp merged 1 commit into
ceph:masterfrom
SUSE:wip-fix-46833
Aug 5, 2020
Merged

sebastian-philipp merged 1 commit into
ceph:masterfrom
SUSE:wip-fix-46833

Conversation

@tserong

@tserong tserong commented Aug 5, 2020

Copy link
Copy Markdown
Member

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 #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 [email protected]

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
ceph#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 <[email protected]>
@sebastian-philipp

Copy link
Copy Markdown
Contributor

This bug was introduced with f9e5dd5

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Aug 5, 2020
@sebastian-philipp
sebastian-philipp merged commit 4510389 into ceph:master Aug 5, 2020
@tserong
tserong deleted the wip-fix-46833 branch August 6, 2020 05:33
@smithfarm smithfarm changed the title cephadm: don't add ceph-volume lvm activate for adopted simple OSDs cephadm: don't add "ceph-volume lvm activate" for adopted simple OSDs Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants