~smoser/cloud-init:fix/cii-kvmimage-preserve-original

Last commit made on 2017-11-27
Get this branch:
git clone -b fix/cii-kvmimage-preserve-original https://git.launchpad.net/~smoser/cloud-init
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
fix/cii-kvmimage-preserve-original
Repository:
lp:~smoser/cloud-init

Recent commits

27ff241... by Scott Moser on 2017-11-27

better error messages on multiple images found

86255ca... by Scott Moser on 2017-11-22

test: make NoCloud snapshot keep its own image snapshot, cleanup.

the nocloud snapshot copies the image it is provided.
Image.snapshot() now returns a snapshot that has its own copy of the
image. We copy rather than qcow backing off the Image so that the Image
can be destroyed without breaking the snapshot.

Also some cleanup on names of functions.
  * NoCloudKVM.create_image() returned an instance before
    now it has create_instance which creates an instance.
  * NoCloudKVMInstance has a 'disk' attribute separate from 'name'

3f75d13... by Scott Moser on 2017-11-09

tests: NoCloudKVMImage do not modify the original local cache image.

The NoCloudKVMImage.execute() would modify the image in /srv/citest
that meant that after the first time you ran a test, the image was
dirty.

The change here is to make the image operate on a qcow backed image.

We will also have to modify Snapshot to then copy the qcow rather
than creating another chained qcow. The reason being that the image
might go away but the snaphot stick around.

Also drop use of 'override_templates' which was only relevant to LXD.

4964fb3... by Joshua Powers on 2017-11-22

tests: Enable bionic in integration tests.

9ac735b... by Scott Moser on 2017-11-21

tests: Use apt-get to install a deb so that depends get resolved.

Instead of using 'dpkg -i' to install a package and then running
apt-get -f install, to hope that it would install needed dependencies
we can just use 'apt-get' directly to do the install.

The 'dpkg/apt-get -f' path was a problem if the installed deb was
older than the available deb. In that case it would get replaced.

bbe91cd... by Ryan McCabe on 2017-11-20

sysconfig: Correctly render dns and dns search info.

Currently when dns and dns search info is provided, it is not rendered
when outputting to sysconfig format.

This patch causes the DNS and DOMAIN lines to be written out rendering
sysconfig.

LP: #1705804

7624348... by Scott Moser on 2017-11-20

integration test: replace curtin test ppa with cloud-init test ppa.

Cloud-init integration tests should not depend on a curtin test ppa.
We already had a cloud-init test ppa for explicitly this purpose.
Just use it instead.

281a821... by Scott Moser on 2017-11-20

EC2: Fix bug using fallback_nic and metadata when restoring from cache.

If user upgraded to new cloud-init and attempted to run 'cloud-init init'
without rebooting, cloud-init restores the datasource object from pickle.
The older version pickled datasource object had no value for
_network_config or fallback_nic. This caused the Ec2 datasource to attempt
to reconfigure networking with a None fallback_nic. The pickled object
also cached an older version of ec2 metadata which didn't contain network
information.

This branch does two things:
 - Add a fallback_interface property to DatasourceEC2 to support reading the
   old .fallback_nic attribute if it was set. New versions will
   call net.find_fallback_nic() if there has not been one found.
 - Re-crawl metadata if we are on Ec2 and don't have a 'network' key in
   metadata

LP: #1732917

d3a0958... by Scott Moser on 2017-11-19

EC2: Kill dhclient process used in sandbox dhclient.

dhclient runs, obtains a address and then backgrounds itself.
cloud-init did not take care to kill it after it was done with it.
After it has run and created the leases, we can kill it.

LP: #1732964

d90318b... by Chad Smith on 2017-11-17

ntp: fix configuration template rendering for openSUSE and SLES

Add opensuse distro support to cc_ntp module.

LP: #1726572