]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
dashboard: allow collecting stats from the host v4.0.70.4
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Dec 2021 14:43:45 +0000 (15:43 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 May 2022 11:46:05 +0000 (13:46 +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)
(cherry picked from commit 2e2d893d28d74f101a9c8c94ca98d12445ff2267)

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

index 346c84e6269c95066cf38ce9d9db976999ab104b..182a85e8bb77cc217db314b9e4f1df336528ca1a 100644 (file)
@@ -22,11 +22,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' %}