Project

General

Profile

Actions

Feature #15733

open

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

Added by Ken Dreyer about 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

Also available in: Atom PDF