]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: pass "--security-opt label=disable" to node-exporter container 45597/head
authorAdam King <adking@redhat.com>
Thu, 24 Mar 2022 13:59:10 +0000 (09:59 -0400)
committerAdam King <adking@redhat.com>
Thu, 24 Mar 2022 13:59:10 +0000 (09:59 -0400)
in order to support setting '--path.procfs=/host/proc','--path.sysfs=/host/sys',
'--path.rootfs=/rootfs' for node-exporter we need to disable selinux separation
between the node-exporter container and the host to avoid selinux denials

Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/cephadm

index 47afc1fb915ee1d9c577520980abe4e54f7b7811..d744dbad9c5fcd3bf6c520c743449232d71cf4ed 100755 (executable)
@@ -2807,6 +2807,11 @@ def get_container(ctx: CephadmContext,
             # by ubuntu 18.04 kernel!)
         ]
         container_args.extend(monitoring_args)
+        if daemon_type == 'node-exporter':
+            # in order to support setting '--path.procfs=/host/proc','--path.sysfs=/host/sys',
+            # '--path.rootfs=/rootfs' for node-exporter we need to disable selinux separation
+            # between the node-exporter container and the host to avoid selinux denials
+            container_args.extend(['--security-opt', 'label=disable'])
     elif daemon_type == 'crash':
         ceph_args = ['-n', name]
     elif daemon_type in Ceph.daemons: