Project

General

Profile

Actions

Feature #15733

open

ceph-osd should chown OSD data when --setuser is specified

Added by Ken Dreyer almost 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Currently users that upgrade from Hammer have to run a large "chown" operation (or series of operations) by hand.

Since the OSD starts as root in systemd and drops privileges with --setuser ceph --setgroup ceph, one of the things that the OSD could do before dropping privileges is run the recursive chown operation on all the OSD data. This would be particularly nice because we even know the UID, from the --setuser argument.

Argument for implementing in ceph-disk

ceph-disk already contains heuristics for determining the user/group to pass to ceph-osd [1] and --setuser ceph --setgroup ceph is hardcoded when starting ceph-osd via the systemd service [2].

If someone is passing a user/group other than "ceph" to the OSD via --setuser/--setgroup, they will be doing the same with ceph-disk (which also takes --setuser/--setgroup). Alternatively they will not be using ceph-disk at all.

[1] https://github.com/ceph/ceph/blob/master/src/ceph-disk/ceph_disk/main.py#L951

[2] https://github.com/ceph/ceph/blob/master/systemd/ceph-osd%40.service#L12

Actions #1

Updated by Vasu Kulkarni almost 8 years ago

+1 , will be very useful

Actions #2

Updated by Nathan Cutler almost 8 years ago

  • Assignee set to Nathan Cutler
  • Source changed from other to Development

Agreed on ceph-devel to do the recursive chown in ceph-disk instead of in the OSD itself: http://comments.gmane.org/gmane.comp.file-systems.ceph.devel/31173

Actions #3

Updated by Nathan Cutler almost 8 years ago

  • Project changed from Ceph to devops
  • Subject changed from OSD should chown its own data when --setuser is specified to ceph-disk should chown OSD data when --setuser is specified
Actions #4

Updated by Nathan Cutler almost 8 years ago

  • Description updated (diff)
Actions #5

Updated by Nathan Cutler almost 8 years ago

  • Related to Bug #15874: Upon hammer->jewel upgrade, OSD cannot access journal device until after reboot added
Actions #6

Updated by Nathan Cutler almost 8 years ago

  • Related to deleted (Bug #15874: Upon hammer->jewel upgrade, OSD cannot access journal device until after reboot)
Actions #7

Updated by Yuri Weinstein almost 8 years ago

@Nathan Weinberg - Can we/do we want to add ceph-disk ops into standard upgrade suites ?

Actions #8

Updated by Nathan Cutler almost 8 years ago

@Yuri: IIRC the "install" and "ceph" tasks are not using systemd. Perhaps that is the reason why the upgrade suite is not catching these bugs.

Actions #9

Updated by Ken Dreyer almost 8 years ago

Exactly :((((((

Actions #10

Updated by Nathan Cutler almost 8 years ago

@Ken In light of #15874 I realized that it's not enough to do the recursive chown at boot time. On package upgrade there is a reasonable assumption that one can simply restart the services and they will work without an intervening reboot. And "systemctl restart ceph.target" does not exercise ceph-disk at all.

So we're back to doing it in the OSD.

Actions #11

Updated by Ken Dreyer almost 8 years ago

  • Subject changed from ceph-disk should chown OSD data when --setuser is specified to ceph-osd should chown OSD data when --setuser is specified
Actions #12

Updated by Nathan Cutler over 7 years ago

  • Status changed from New to Rejected

Not going to happen.

Actions #13

Updated by Nathan Cutler over 7 years ago

  • Status changed from Rejected to New
  • Assignee deleted (Nathan Cutler)
Actions

Also available in: Atom PDF