summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_resizefs.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-07-19 15:42:52 -0400
committerScott Moser <smoser@ubuntu.com>2011-07-19 15:42:52 -0400
commit20a0cf9bf34408706f34edee5e1e75fd9676774c (patch)
treedd5b94e6df9586e145ee5cca27ffddf8adc25aa5 /cloudinit/CloudConfig/cc_resizefs.py
parente7899aa1f904cfe8daf8cf7652f3be6a7381d09c (diff)
downloadvyos-cloud-init-20a0cf9bf34408706f34edee5e1e75fd9676774c.tar.gz
vyos-cloud-init-20a0cf9bf34408706f34edee5e1e75fd9676774c.zip
do not complain if attempt to resizefs in an lxc container fails
it is expected / understood that mknod would fail inside an lxc container. So, if thats the case, just log a debug message saying so. LP: #800856
Diffstat (limited to 'cloudinit/CloudConfig/cc_resizefs.py')
-rw-r--r--cloudinit/CloudConfig/cc_resizefs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py
index e396b283..883c269b 100644
--- a/cloudinit/CloudConfig/cc_resizefs.py
+++ b/cloudinit/CloudConfig/cc_resizefs.py
@@ -42,6 +42,9 @@ def handle(name,cfg,cloud,log,args):
dev=os.makedev(os.major(st_dev),os.minor(st_dev))
os.mknod(devpth, 0400 | stat.S_IFBLK, dev)
except:
+ if util.islxc():
+ log.debug("inside lxc, ignoring mknod failure in resizefs")
+ return
log.warn("Failed to make device node to resize /")
raise