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 <mbroz@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
This commit is contained in:
Milan Broz 2015-06-12 13:07:05 +02:00 committed by Boris Ranto
parent c52eb995e0
commit 9db80da128

View File

@ -953,6 +953,12 @@ def mount(
path,
],
)
command(
[
'restorecon',
path,
],
)
except subprocess.CalledProcessError as e:
try:
os.rmdir(path)