]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
Restore SELinux context of OSD journals
authorZack Cerza <zack@redhat.com>
Mon, 24 Jul 2017 23:07:58 +0000 (16:07 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 24 Jul 2017 23:18:41 +0000 (16:18 -0700)
So that our SELinux policy can properly allow collectors to detect
whether an OSD uses filestore or bluestore

Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-collectd/tasks/selinux.yml

index d0937691c029bbeb303660f8f483ab1e5e87e94f..80885e3aa3610696638fa32c1f6dc8e4d06412b8 100644 (file)
@@ -5,6 +5,12 @@
     state: yes
     persistent: yes
 
+- name: Restore SELinux context of OSD journals
+  shell: "restorecon -R -v /var/lib/ceph/osd/*/journal"
+  when: "'osds' in group_names"
+  register: restorecon
+  changed_when: restorecon.stdout|length != 0 or restorecon.stderr|length != 0
+
 - include: selinux_module.yml
   when:
     - devel_mode