podman: Add systemd dependency on network.target

When using podman, the systemd unit scripts don't have a dependency
on the network. So we're not sure that the network is up and running
when the containers are starting.
With docker this behaviour is already handled because the systemd
unit scripts depend on docker service which is started after the
network.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit f49090df7e)
pull/4070/head
Dimitri Savineau 2019-06-06 15:41:35 -04:00 committed by Guillaume Abrioux
parent 1daca1ba83
commit e9edb5a92a
14 changed files with 28 additions and 0 deletions

View File

@ -4,6 +4,8 @@
Description=grafana-server
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=RBD Target API Service
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=RBD Target Gateway Service
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=TCMU Runner
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=Ceph MDS
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
{% set cpu_limit = ansible_processor_vcpus|int if ceph_mds_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_mds_docker_cpu_limit|int %}

View File

@ -2,6 +2,8 @@
Description=Ceph Manager
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=Ceph Monitor
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -3,6 +3,8 @@ Description=NFS-Ganesha file server
Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -4,6 +4,8 @@
Description=Node Exporter
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -3,6 +3,8 @@
Description=Ceph OSD
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -4,6 +4,8 @@
Description=alertmanager
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -4,6 +4,8 @@
Description=prometheus
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=Ceph RBD mirror
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]

View File

@ -2,6 +2,8 @@
Description=Ceph RGW
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
{% set cpu_limit = ansible_processor_vcpus|int if ceph_rgw_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_rgw_docker_cpu_limit|int %}