summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index b8c3e4ee..415ca374 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -330,7 +330,11 @@ class SeLinuxGuard(object):
LOG.debug("Restoring selinux mode for %s (recursive=%s)",
path, self.recursive)
- self.selinux.restorecon(path, recursive=self.recursive)
+ try:
+ self.selinux.restorecon(path, recursive=self.recursive)
+ except OSError as e:
+ LOG.warning('restorecon failed on %s,%s maybe badness? %s',
+ path, self.recursive, e)
class MountFailedError(Exception):