From: Milan Broz Date: Fri, 12 Jun 2015 11:07:05 +0000 (+0200) Subject: Fix selinux context after intitial OSD mount. X-Git-Tag: v9.1.0~432^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9db80da12803d42bb676d67f37442c0c54d83448;p=ceph.git Fix selinux context after intitial OSD mount. The SELinux context is not preserved across file-systems, we need to manually set the context of the root of the file-system in order to preserve SELinux context inheritence rules. Signed-off-by: Milan Broz Reviewed-by: Boris Ranto --- diff --git a/src/ceph-disk b/src/ceph-disk index 5c0e1ba65e95..fc7949f71b72 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -953,6 +953,12 @@ def mount( path, ], ) + command( + [ + 'restorecon', + path, + ], + ) except subprocess.CalledProcessError as e: try: os.rmdir(path)