~goneri/cloud-init:freebsd_growfs

Last commit made on 2019-05-09
Get this branch:
git clone -b freebsd_growfs https://git.launchpad.net/~goneri/cloud-init
Only Gonéri Le Bouder can upload to this branch. If you are Gonéri Le Bouder please log in for upload directions.

Branch merges

Branch information

Name:
freebsd_growfs
Repository:
lp:~goneri/cloud-init

Recent commits

a88924b... by Gonéri Le Bouder

freebsd: pass the mountpoint to growfs

growfs behaviour depends on the partition naming, if we use the
/dev/vtbd0p4 format, we can end-up with a "operation not permitted"
error. The good news is that growfs can also accept a mount point
as an argument.

See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237392

0b1c050... by Gonéri Le Bouder

freebsd: resizefs, add support for newfs -L argumet

newfs -L argument is used to specify a label for the new filesystem.

Without this patch, cc_resizefs.py returns the following error:

```
2019-04-19 15:40:28,010 - util.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/config/cc_resizefs.py'>) failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/stages.py", line 812, in _run_modules
    freq=freq)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/cloud.py", line 54, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/helpers.py", line 187, in run
    results = functor(*args)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/config/cc_resizefs.py", line 271, in handle
    if can_skip_resize(fs_type, resize_what, devpth):
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/config/cc_resizefs.py", line 165, in can_skip_resize
    return func(resize_what, devpth)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-18.5-py2.7.egg/cloudinit/config/cc_resizefs.py", line 114, in _can_skip_resize_ufs
    optlist, _args = getopt.getopt(newfs_cmd[1:], opt_value)
  File "/usr/local/lib/python2.7/getopt.py", line 90, in getopt
    opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
  File "/usr/local/lib/python2.7/getopt.py", line 190, in do_shorts
    if short_has_arg(opt, shortopts):
  File "/usr/local/lib/python2.7/getopt.py", line 206, in short_has_arg
    raise GetoptError('option -%s not recognized' % opt, opt)
GetoptError: option -L not recognized
```

ff51064... by Gonéri Le Bouder

freebsd: add support for the /dev/ufs/root format

Improve `find_freebsd_part()` in order to cover the `/dev/ufs/root`
device format.

0fca5ee... by Gonéri Le Bouder

freebsd: growpart: lookup the partition name

Convert the /dev/$type/root format to /dev/$device. $type can be
label, gpt or ufs.

2f75005... by Gonéri Le Bouder

freebsd: add GPT support to find_freebsd_part()

On a system with a GPT partition table, the root device is called
`/dev/gpt/rootfs`. This patch modify `find_freebsd_part()` to get
the real partition name.

7193b80... by Gonéri Le Bouder

freebsd: add chpasswd pkg in the image

cc_set_passwords.py depends on chpasswd binary.

ce5fe3a... by Paride Legovini

tests: add Eoan release

acc25d8... by "Jason Zions (MSFT)" <email address hidden>

cc_mounts: check if mount -a on no-change fstab path

Under some circumstances, cc_disk_setup may reformat volumes which
already appear in /etc/fstab (e.g. Azure ephemeral drive is reformatted
from NTFS to ext4 after service-heal). Normally, cc_mounts only calls
mount -a if it altered /etc/fstab. With this change cc_mounts will read
/proc/mounts and verify if configured mounts are already mounted and if
not raise flag to request a mount -a. This handles the case where no
changes to fstab occur but a mount -a is required due to change in
underlying device which prevented the .mount unit from running until
after disk was reformatted.

LP: #1825596

9aa97cf... by Dan Watkins

replace remaining occurrences of LOG.warn

ab6621d... by Anh Vo (MSFT)

DataSourceAzure: Adjust timeout for polling IMDS

If the IMDS primary server is not available, falling back to the
secondary server takes about 1s. The net result is that the
expected E2E time is slightly more than 1s. This change increases
the timeout to 2s to prevent the infinite loop of timeouts.