]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
container: use tmpfiles.d to creates /run/ceph
authorGuillaume Abrioux <gabrioux@redhat.com>
Sun, 10 Feb 2019 07:21:43 +0000 (08:21 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 13 Feb 2019 08:42:27 +0000 (09:42 +0100)
commit8c8ec636337e85efea5095ecd5b1fab17fdd51e6
tree678701ec557e51f5cade487b24fbb1b19621df40
parent7e0a70f7a8c2cdd0475081f9837a2917425d35e3
container: use tmpfiles.d to creates /run/ceph

instead of using `RuntimeDirectory` parameter in systemd unit files,
let's use a systemd `tmpfiles.d` to ensure `/run/ceph`.

Explanation:

`podman` doesn't create the `/var/run/ceph` if it doesn't exist the time
where the container is run while `docker` used to create it.
In case of `switch_to_containers` scenario, `/run/ceph` gets created by
a tmpfiles.d systemd file; when switching to containers, the systemd
unit file complains because `/run/ceph` already exists

The better fix would be to ensure `/usr/lib/tmpfiles.d/ceph-common.conf`
is removed and only rely on `RuntimeDirectory` from systemd unit file parameter
but we come from a non-containerized environment which is already running,
it means `/run/ceph` is already created and when starting the unit to
start the container, systemd will still complain and we can't simply
remove the directory if daemons are collocated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-nfs/templates/ceph-nfs.service.j2
roles/ceph-osd/templates/ceph-osd.service.j2
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
roles/ceph-rgw/templates/ceph-radosgw.service.j2