mirror of
https://github.com/ceph/ceph
synced 2024-12-26 13:33:57 +00:00
ceph-disk: only call restorecon when available
9db80da128
added an unconditional call to
restorecon after mounting the filesystem. It fails when restorecon is
not available and must be made conditional.
http://tracker.ceph.com/issues/12718 Fixes: #12718
Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
parent
c3de0affcb
commit
3aab146bb7
@ -963,12 +963,13 @@ def mount(
|
||||
path,
|
||||
],
|
||||
)
|
||||
command(
|
||||
[
|
||||
'restorecon',
|
||||
path,
|
||||
if which('restorecon'):
|
||||
command(
|
||||
[
|
||||
'restorecon',
|
||||
path,
|
||||
],
|
||||
)
|
||||
)
|
||||
except subprocess.CalledProcessError as e:
|
||||
try:
|
||||
os.rmdir(path)
|
||||
|
Loading…
Reference in New Issue
Block a user