containers: improve logging

bindmount /var/log/ceph on all containers so it's possible to retrieve
logs from the host.

related ceph-container PR: ceph/ceph-container#1408

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/4174/head
Guillaume Abrioux 2019-06-26 15:38:58 +02:00 committed by Dimitri Savineau
parent 02fbe76e62
commit 33eed78d17
11 changed files with 10 additions and 4 deletions

View File

@ -38,10 +38,6 @@ osd pool default crush rule = {{ osd_pool_default_crush_rule | default(ceph_osd_
{% endif %}
fsid = {{ fsid }}
{% if containerized_deployment %}
log file = /dev/null
mon cluster log file = /dev/null
{% endif %}
mon host = {% if nb_mon > 0 %}
{% for host in _monitor_addresses -%}
{% if msgr2_migration | default(False) %}

View File

@ -25,6 +25,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
-v /dev/log:/dev/log \
-v /lib/modules:/lib/modules \
-v /etc/ceph:/etc/ceph \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=RBD_TARGET_API \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -25,6 +25,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
-v /dev/log:/dev/log \
-v /lib/modules:/lib/modules \
-v /etc/ceph:/etc/ceph \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=RBD_TARGET_GW \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -24,6 +24,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
-v /dev:/dev \
-v /lib/modules:/lib/modules \
-v /etc/ceph:/etc/ceph \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=TCMU_RUNNER \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -22,6 +22,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=MDS \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -21,6 +21,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=MGR \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -21,6 +21,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
{% if mon_docker_privileged -%}
--privileged \
{% endif -%}

View File

@ -17,6 +17,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /var/lib/nfs/ganesha:/var/lib/nfs/ganesha:z \
-v /etc/ganesha:/etc/ganesha:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /var/log/ceph:/var/log/ceph:z \
{% if ceph_nfs_dynamic_exports %}
--privileged \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \

View File

@ -37,6 +37,7 @@ numactl \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /var/run/udev/:/var/run/udev/ \
-v /var/log/ceph:/var/log/ceph:z \
{% if ansible_distribution == 'Ubuntu' -%}
--security-opt apparmor:unconfined \
{% endif -%}

View File

@ -21,6 +21,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=RBD_MIRROR \
-e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \

View File

@ -28,6 +28,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
-v /var/log/ceph:/var/log/ceph:z \
{% if ansible_distribution == 'RedHat' -%}
-v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:z \
{% endif -%}