~ubuntu-branches/ubuntu/saucy/cloud-init/saucy-proposed

« back to all changes in this revision

Viewing changes to cloudinit/config/cc_growpart.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-08-14 21:44:22 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20130814214422-uzrq82t5srz2g4c2
Tags: 0.7.3~bzr858-0ubuntu1
* New upstream snapshot.
  * fix resizing of root partition by preferring the functional 'growpart'
    support over the broken 'parted resizepart' support (LP: #1212444)
  * add options for apt_ftp_proxy, apt_https_proxy and apt_config
    (LP: #1057195)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    def resize(self, diskdev, partnum, partdev):
97
97
        before = get_size(partdev)
98
98
        try:
99
 
            util.subp(["parted", "resizepart", diskdev, partnum])
 
99
            util.subp(["parted", diskdev, "resizepart", partnum])
100
100
        except util.ProcessExecutionError as e:
101
101
            raise ResizeFailedException(e)
102
102
 
264
264
            raise e
265
265
        return
266
266
 
267
 
    resized = resize_devices(resizer, devices)
 
267
    resized = util.log_time(logfunc=log.debug, msg="resize_devices",
 
268
                            func=resize_devices, args=(resizer, devices))
268
269
    for (entry, action, msg) in resized:
269
270
        if action == RESIZE.CHANGED:
270
271
            log.info("'%s' resized: %s" % (entry, msg))
271
272
        else:
272
273
            log.debug("'%s' %s: %s" % (entry, action, msg))
273
274
 
274
 
RESIZERS = (('parted', ResizeParted), ('growpart', ResizeGrowPart))
 
275
# LP: 1212444 FIXME re-order and favor ResizeParted
 
276
#RESIZERS = (('growpart', ResizeGrowPart),)
 
277
RESIZERS = (('growpart', ResizeGrowPart), ('parted', ResizeParted))