~chad.smith/cloud-init:bug/status-fix-done-status

Last commit made on 2018-02-07
Get this branch:
git clone -b bug/status-fix-done-status https://git.launchpad.net/~chad.smith/cloud-init
Only Chad Smith can upload to this branch. If you are Chad Smith please log in for upload directions.

Branch merges

Branch information

Name:
bug/status-fix-done-status
Repository:
lp:~chad.smith/cloud-init

Recent commits

c29199c... by Chad Smith

cli: fix cloud-init status to report running when before result.json

Fix various corner cases for cloud-init status subcommand. Report
'runnning' under the following conditions:
 - No /run/cloud-init/result.json file exists
 - Any stage in status.json is unfinished
 - status.json reports a non-null stage it is in progress on

45289a0... by Tatiana Kholkina <email address hidden>

Fix ssh keys validation in ssh_util

This fixes a bug where invalid keys would sneak into authorized_keys.

f7deaf1... by Chad Smith

docs: Update RTD content for cloud-init subcommands.

Give a bit more detailed information which others can quickly reference to
discover new CLI subcommand functionality. This section was a bit stale as
we've introduced cloud-init status, clean and analyze content that was a
bit under represented. Since we've had a few request of externals who try
to run cloud-init subcommands on the commandline instead of rebooting,
it's probably worth a bit of content here to describe how those init and
module subcommands work.

5e5dc97... by Scott Moser

OVF: Extend well-known labels to include OVFENV.

Fujitsu Cloud Service attaches a ovf iso transport with a label
'OVFENV'. This seems to be a reasonable value as a label.

While the for bug 1731868 would likely fix cloud-init on fujitsu
cloud, this change will find it faster.

LP: #1698669

1d8c327... by Chad Smith

Fix potential cases of uninitialized variables.

While addressing undeclared variable in 'cloud-init status', I also fixed
the errors raised by automated code reviews against cloud-init master at
https://lgtm.com/projects/g/cloud-init/cloud-init/alerts

The following items are addressed:

 * Fix 'cloud-init status':
    * Only report 'running' state when any stage in
      /run/cloud-init/status.json has a start time but no finished time.
      Default start time to 0 if null.
    * undeclared variable 'reason' now reports 'Cloud-init enabled by
      systemd cloud-init-generator' when systemd enables cloud-init

 * cc_rh_subscription.py util.subp return values aren't set during if an
   exception is raised, use ProcessExecution as e instead.

 * distros/freebsd.py:
   * Drop repetitive looping over ipv4 and ipv6 nic lists.
   * Initialize bsddev to 'NOTFOUND' in the event that no devs are
     discovered
   * declare nics_with_addresses = set() in broader scope outside
     check_downable conditional

 * cloudinit/util.py: Raise TypeError if mtype parameter isn't string,
   iterable or None.

LP: #1744796

bc84f50... by Scott Moser

tests: Collect script output as binary, collect systemd journal, fix lxd.

This adds collection a gzip compressed systemd journal on systemd systems.
The file can later be reviewed with:
  zcat system.journal.gz > system.journal
  journalctl --file=system.journal [-o short-monotonic ..]

To support this:
  * modify test harness infrastructure to not assume content is utf-8.
  * fix lxd platform to support make '_execute' return bytes rather
    than a string. https://github.com/lxc/pylxd/issues/268

Also switched the base collectors to use /bin/sh as others already did.

bccee93... by Scott Moser

HACKING.rst: mention setting user name and email via git config.

Just include mention of setting user name and email when first
setting up git.

c03bdd3... by Douglas Jordan

Azure VM Preprovisioning support.

This change will enable azure vms to report provisioning has completed
twice, first to tell the fabric it has completed then a second time to
enable customer settings. The datasource for the second provisioning is
the Instance Metadata Service (IMDS),and the VM will poll indefinitely for
the new ovf-env.xml from IMDS.

This branch introduces EphemeralDHCPv4 which encapsulates common logic
used by both DataSourceEc2 an DataSourceAzure for temporary DHCP
interactions without side-effects.

LP: #1734991

30597f2... by Scott Moser

tools/read-version: Fix read-version when in a git worktree.

read-version --json would report bad data when working in a worktree.
This is just because in a worktree, .git is not a directory, but
rather a metadata file that points to the another path.
  $ git worktree ../mytree
  $ cat ../mytree/.git
  gitdir: /path/to/cloud-init/.git/worktrees/mytree
  $ rm -Rf ../mytree; git worktree prune

df182de... by aRkadeFR <email address hidden>

docs: Fix typos in docs and one debug message.

Fix obvious typos. Replace 'for for' with a 'for'.