Skip to content

Commit 86ac9a8

Browse files
committed
dashboard: allow collecting stats from the host
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 0f34cd1)
1 parent 36248ed commit 86ac9a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
2323
{% endif %}
2424
--pids-limit={{ 0 if container_binary == 'podman' else -1 }} \
2525
--privileged \
26-
-v /proc:/host/proc:ro -v /sys:/host/sys:ro \
26+
--security-opt label=disable \
27+
-v /:/rootfs:ro \
2728
--net=host \
2829
{{ node_exporter_container_image }} \
29-
--path.procfs=/host/proc \
30-
--path.sysfs=/host/sys \
30+
--path.procfs=/rootfs/proc \
31+
--path.sysfs=/rootfs/sys \
32+
--path.rootfs=/rootfs \
3133
--no-collector.timex \
3234
--web.listen-address=:{{ node_exporter_port }}
3335
{% if container_binary == 'podman' %}

0 commit comments

Comments
 (0)