diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-17 11:16:56 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-17 11:16:56 -0500 |
commit | 98fd17c55b637f4e1d136c954567c1d9b23e6c20 (patch) | |
tree | e7e8ef330eb6a65718c26c06871048de608ce6ef /cloudinit/config | |
parent | 6f8904ceb3805bd62725e5e6c3167fed0202c641 (diff) | |
download | vyos-cloud-init-98fd17c55b637f4e1d136c954567c1d9b23e6c20.tar.gz vyos-cloud-init-98fd17c55b637f4e1d136c954567c1d9b23e6c20.zip |
remove support for resizing via 'parted resizepart'
This was previously broken anyway. It doesn't seem like there
was an easy way to actually support it, so for now I'm removing
it entirely. growpart works well enough.
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_growpart.py | 28 |
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),) |