podman: force log driver to journald

Since we've changed to podman configuration using the detach mode and
systemd type to forking then the container logs aren't present in the
journald anymore.
The default conmon log driver is using k8s-file.

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

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 16cd183b9c)
pull/5996/head
Dimitri Savineau 2020-10-22 10:59:15 -04:00 committed by Dimitri Savineau
parent 4e15d10e22
commit ec8903f4af
15 changed files with 15 additions and 15 deletions

View File

@ -14,7 +14,7 @@ ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-crash-%i
ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-crash-%i \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--net=host \
-v /var/lib/ceph:/var/lib/ceph:z \

View File

@ -19,7 +19,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop grafana-server
ExecStartPre=-/usr/bin/{{ container_binary }} rm grafana-server
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=grafana-server \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
-v /etc/grafana:/etc/grafana:Z \
-v /var/lib/grafana:/var/lib/grafana:Z \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-api
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-api
ExecStart=/usr/bin/{{ container_binary }} run --rm \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_rbd_target_api_docker_memory_limit }} \
--cpus={{ ceph_rbd_target_api_docker_cpu_limit }} \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop rbd-target-gw
ExecStartPre=-/usr/bin/{{ container_binary }} rm rbd-target-gw
ExecStart=/usr/bin/{{ container_binary }} run --rm \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_rbd_target_gw_docker_memory_limit }} \
--cpus={{ ceph_rbd_target_gw_docker_cpu_limit }} \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop tcmu-runner
ExecStartPre=-/usr/bin/{{ container_binary }} rm tcmu-runner
ExecStart=/usr/bin/{{ container_binary }} run --rm \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_tcmu_runner_docker_memory_limit }} \
--cpus={{ ceph_tcmu_runner_docker_cpu_limit }} \

View File

@ -18,7 +18,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mds-{{ ansible_hostname
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mds-{{ ansible_hostname }}
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_mds_docker_memory_limit }} \
--cpus={{ cpu_limit }} \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mgr-{{ ansible_hostname
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mgr-{{ ansible_hostname }}
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_mgr_docker_memory_limit }} \
--cpus={{ ceph_mgr_docker_cpu_limit }} \

View File

@ -16,7 +16,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mon-%i
ExecStartPre=/bin/sh -c '"$(command -v mkdir)" -p /etc/ceph /var/lib/ceph/mon'
ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_mon_docker_memory_limit }} \
--cpus={{ ceph_mon_docker_cpu_limit }} \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-nfs-%i
ExecStartPre={{ '/bin/mkdir' if ansible_os_family == 'Debian' else '/usr/bin/mkdir' }} -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha /var/log/ganesha
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
-v /var/lib/ceph:/var/lib/ceph:z \
-v /etc/ceph:/etc/ceph:z \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f node-exporter
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--privileged \
-v /proc:/host/proc:ro -v /sys:/host/sys:ro \

View File

@ -23,7 +23,7 @@ numactl \
{% endif %}
/usr/bin/{{ container_binary }} run \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--rm \
--net=host \

View File

@ -18,7 +18,7 @@ ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f alertmanager
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
-v "{{ alertmanager_conf_dir }}:/etc/alertmanager:Z" \
-v "{{ alertmanager_data_dir }}:/alertmanager:Z" \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f prometheus
ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
-v "{{ prometheus_conf_dir }}:/etc/prometheus:Z" \
-v "{{ prometheus_data_dir }}:/prometheus:Z" \

View File

@ -17,7 +17,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rbd-mirror-{{ ansible_ho
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rbd-mirror-{{ ansible_hostname }}
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_rbd_mirror_docker_memory_limit }} \
--cpus={{ ceph_rbd_mirror_docker_cpu_limit }} \

View File

@ -18,7 +18,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
-d --log-driver journald --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \
{% endif %}
--memory={{ ceph_rgw_docker_memory_limit }} \
--cpus={{ cpu_limit }} \