summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-17 15:12:57 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-17 15:12:57 -0500
commit121f7e28e7388f167ae4607b73a2c5ac58f9ec83 (patch)
tree6e2d0c733a4d3d4166bc12eaa2c6c4d252a2ca79 /cloudinit/config
parent63a3fb1912f721ff161d75d956f6172a31971956 (diff)
parent98fd17c55b637f4e1d136c954567c1d9b23e6c20 (diff)
downloadvyos-cloud-init-121f7e28e7388f167ae4607b73a2c5ac58f9ec83.tar.gz
vyos-cloud-init-121f7e28e7388f167ae4607b73a2c5ac58f9ec83.zip
merge from trunk
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_growpart.py28
1 files changed, 1 insertions, 27 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py
index 0dd92a46..6bddf847 100644
--- a/cloudinit/config/cc_growpart.py
+++ b/cloudinit/config/cc_growpart.py
@@ -80,30 +80,6 @@ class ResizeFailedException(Exception):
pass
-class ResizeParted(object):
- def available(self):
- myenv = os.environ.copy()
- myenv['LANG'] = 'C'
-
- try:
- (out, _err) = util.subp(["parted", "--help"], env=myenv)
- if re.search(r"COMMAND.*resizepart\s+", out, re.DOTALL):
- return True
-
- except util.ProcessExecutionError:
- pass
- return False
-
- def resize(self, diskdev, partnum, partdev):
- before = get_size(partdev)
- try:
- util.subp(["parted", diskdev, "resizepart", partnum])
- except util.ProcessExecutionError as e:
- raise ResizeFailedException(e)
-
- return (before, get_size(partdev))
-
-
class ResizeGrowPart(object):
def available(self):
myenv = os.environ.copy()
@@ -279,6 +255,4 @@ def handle(_name, cfg, _cloud, log, _args):
else:
log.debug("'%s' %s: %s" % (entry, action, msg))
-# LP: 1212444 FIXME re-order and favor ResizeParted
-#RESIZERS = (('growpart', ResizeGrowPart),)
-RESIZERS = (('growpart', ResizeGrowPart), ('parted', ResizeParted))
+RESIZERS = (('growpart', ResizeGrowPart),)