Commit Graph

4 Commits

Author SHA1 Message Date
Sage Weil
ea91c4ef85 systemd: tmpfiles.d in /run, not /var/run
Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-11 11:38:47 -04:00
Sage Weil
3aa38bc07f make /var/run/ceph 770 ceph:ceph
This allows members of the ceph group to make librados clients (like the
ceph cli and qemu) create sockets in the default /var/run/ceph/* location.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-11 11:26:59 -04:00
Sage Weil
b8893f6b8a systemd: chown ceph:ceph /var/run/ceph
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-26 20:34:14 -04:00
Ken Dreyer
71a5090bca ceph.spec.in: fix handling of /var/run/ceph
Prior to this commit, we didn't install /var/run/ceph as a normal
directory. We used the %ghost directive and created the directory with
a "mkdir" command in %post.

This was lacking in several ways:

  1) Simplicy: there is no need to use %ghost; other packages (eg.
     mariadb) simply use a normal %dir for their socket directory.

  2) RPM does not have control over the permissions of the /var/run/ceph
     directory. This does not interact well with "rpm -V". Moreover,
     once Ceph itself gets unprivileged user support, RPM itself won't
     be able to set the permissions of the directory for a (future)
     unprivileged UID.

  3) On distributions that use systemd as an init system, /var/run is a
     symlink to /run, which is tmpfs. This means that /var/run/ceph does
     not persist across reboots on those systems.

Remove the %ghost directive; it makes more sense for RPM to simply
install this directory like the rest of the %files.

Add a "_with_systemd" conditional so we know which distros use systemd
as their init system.  Add the /etc/tmpfiles.d/ceph.conf file on those
distros. See
http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-17 12:28:28 -06:00