diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-03-03 17:15:12 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-03-03 17:15:12 -0500 |
commit | a23be741c23978064d0fe6ff6bd8e7fcf0c2cfa8 (patch) | |
tree | 497898e39d1224fab3e49576bdd3677aab1ec366 | |
parent | 616b0b297a7383b5c77c8b886aaf62f37c2a8c95 (diff) | |
download | vyos-cloud-init-a23be741c23978064d0fe6ff6bd8e7fcf0c2cfa8.tar.gz vyos-cloud-init-a23be741c23978064d0fe6ff6bd8e7fcf0c2cfa8.zip |
cc_resizefs.py: log output of failed resizefs or blkid commands
-rw-r--r-- | cloudinit/CloudConfig/cc_resizefs.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py index cb974927..ebb95227 100644 --- a/cloudinit/CloudConfig/cc_resizefs.py +++ b/cloudinit/CloudConfig/cc_resizefs.py @@ -34,8 +34,9 @@ def handle(name,cfg,cloud,log,args): cmd = ['blkid', '-c', '/dev/null', '-sTYPE', '-ovalue', '/dev/root'] try: (fstype,err) = util.subp(cmd) - except Exception as e: + except subprocess.CalledProcessError as e: log.warn("Failed to get filesystem type via %s" % cmd) + log.warn("output=%s\nerror=%s\n", e.output[0], e.output[1]) raise if fstype.startswith("ext"): @@ -48,7 +49,8 @@ def handle(name,cfg,cloud,log,args): try: (out,err) = util.subp(resize_cmd) - except Exception as e: + except subprocess.CalledProcessError as e: log.warn("Failed to resize filesystem (%s)" % resize_cmd) + log.warn("output=%s\nerror=%s\n", e.output[0], e.output[1]) raise |