Skip to content

Commit

Permalink
ceph-disk: only call restorecon when available
Browse files Browse the repository at this point in the history
9db80da 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: ceph#12718

Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
ldachary committed Aug 18, 2015
1 parent c3de0af commit 3aab146
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ceph-disk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3aab146

Please sign in to comment.