Skip to content

Commit

Permalink
docker: Add Requires on docker service
Browse files Browse the repository at this point in the history
When using docker container engine then the systemd unit scripts only
use a dependency on the docker daemon via the After parameter.
But if docker is restarted on a live system then the ceph systemd units
should wait for the docker daemon to be fully restarted.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1846830

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit bd22f1d)
  • Loading branch information
dsavineau committed Jun 22, 2020
1 parent 4e42503 commit 09453e2
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/ceph-grafana/templates/grafana-server.service.j2
Expand Up @@ -4,6 +4,7 @@
Description=grafana-server
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=RBD Target API Service
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=RBD Target Gateway Service
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=TCMU Runner
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-mds/templates/ceph-mds.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=Ceph MDS
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-mgr/templates/ceph-mgr.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=Ceph Manager
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-mon/templates/ceph-mon.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=Ceph Monitor
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-nfs/templates/ceph-nfs.service.j2
Expand Up @@ -3,6 +3,7 @@ Description=NFS-Ganesha file server
Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
Expand Up @@ -4,6 +4,7 @@
Description=Node Exporter
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-osd/templates/ceph-osd.service.j2
Expand Up @@ -3,6 +3,7 @@
Description=Ceph OSD
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-prometheus/templates/alertmanager.service.j2
Expand Up @@ -4,6 +4,7 @@
Description=alertmanager
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-prometheus/templates/prometheus.service.j2
Expand Up @@ -4,6 +4,7 @@
Description=prometheus
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=Ceph RBD mirror
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-rgw/templates/ceph-radosgw.service.j2
Expand Up @@ -2,6 +2,7 @@
Description=Ceph RGW
{% if container_binary == 'docker' %}
After=docker.service
Requires=docker.service
{% else %}
After=network.target
{% endif %}
Expand Down

0 comments on commit 09453e2

Please sign in to comment.