]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
dashboard: run node_export as privileged container
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 3 Dec 2019 13:39:53 +0000 (14:39 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 9 Dec 2019 14:40:13 +0000 (09:40 -0500)
Typical error:

```
type=AVC msg=audit(1575367499.582:3210): avc:  denied  { search } for  pid=26680 comm="node_exporter" name="1" dev="proc" ino=11528 scontext=system_u:system_r:container_t:s0:c100,c1014 tcontext=system_u:system_r:init_t:s0 tclass=dir permissive=0
```

node_exporter needs to be run as privileged to avoid avc denied error
since it gathers lot of information on the host.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1762168
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-node-exporter/templates/node_exporter.service.j2

index 8d95e0c59179b73009e97611ea2e06da7c3fc3f1..22f35eb2794dcc16a857164c730e3b2705a493cd 100644 (file)
@@ -12,6 +12,7 @@ After=network.target
 EnvironmentFile=-/etc/environment
 ExecStartPre=-/usr/bin/{{ container_binary }} rm -f node-exporter
 ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
+  --privileged \
   -v /proc:/host/proc:ro -v /sys:/host/sys:ro \
   --net=host \
   {{ node_exporter_container_image }} \