]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
dashboard: allow collecting stats from the host
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Dec 2021 14:43:45 +0000 (15:43 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 13 Apr 2022 22:37:25 +0000 (00:37 +0200)
This commit makes podman bindmount `/:/rootfs:ro` so the container can
collect data from the host.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2028775
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0f34cd16d808dbb800efd0f558b29bcfb218bbfa)

roles/ceph-node-exporter/templates/node_exporter.service.j2

index a253d652201d84181b25da3c9b96c19abcaca8a4..8641c57d2e13e8ee2a5610cac0581042c347b7ea 100644 (file)
@@ -23,11 +23,13 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
 {% endif %}
   --pids-limit={{ 0 if container_binary == 'podman' else -1 }} \
   --privileged \
-  -v /proc:/host/proc:ro -v /sys:/host/sys:ro \
+  --security-opt label=disable \
+  -v /:/rootfs:ro \
   --net=host \
   {{ node_exporter_container_image }} \
-  --path.procfs=/host/proc \
-  --path.sysfs=/host/sys \
+  --path.procfs=/rootfs/proc \
+  --path.sysfs=/rootfs/sys \
+  --path.rootfs=/rootfs \
   --no-collector.timex \
   --web.listen-address=:{{ node_exporter_port }}
 {% if container_binary == 'podman' %}