Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577570 - sys-cluster/ceph - files/ceph.initd-r1 tries to run daemons as a non-existent "ceph" user
Summary: sys-cluster/ceph - files/ceph.initd-r1 tries to run daemons as a non-existent...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-16 17:47 UTC by frank
Modified: 2016-05-12 21:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frank 2016-03-16 17:47:01 UTC
latest changes to files/ceph.initd-r1 force ceph's daemons to run under a not existent "ceph" user while previous init script was starting them as root.
as consequence if you upgrade or reinstall it won't work anymore because:

1. the "ceph" user doesn't exist
2. even with a "ceph" user the stuff inside /var/lib/ceph still belongs to root

afaik, it's starting from "infernalis" (ceph 9.2) that it's required to run the daemons under a "ceph" user, so why was this change pushed without even printing a warning?

moreover, as it's required to change the ownership of a ton of files/directory and because backward compatibility, imho it would be wiser to let the user decide under which user to run the daemons adding a parameter in /etc/conf.d/ceph instead to hard code the user inside the init script...

than you
Comment 1 Patrick McLean gentoo-dev 2016-05-11 21:51:58 UTC
The ebuild explictly creates the "ceph" user since at least 9.2.0:

user_setup() {
    enewgroup ceph
    enewuser ceph -1 -1 /var/lib/ceph ceph
}

pkg_setup() {
    python_setup
    check-reqs_export_vars
    check-reqs_pkg_setup
    user_setup
}

I don't see how ceph-9.2 could have been merged without this user being created.
Comment 2 frank 2016-05-12 09:48:58 UTC
sorry, i didn't specify i was merging sys-cluster/ceph-0.94.6 which doesn't create any ceph user (and there is no need to) however the /etc/init.d/ceph script tries (and fails) to start the daemons as ceph:

[...]
start-stop-daemon --start -exec ${command} --user ceph --group ceph -- ${command_args}
[...]
Comment 3 Patrick McLean gentoo-dev 2016-05-12 21:05:37 UTC
Fixed in ceph-0.94.6-r1