~otubo/cloud-init:covscan-issues

Last commit made on 2018-10-08
Get this branch:
git clone -b covscan-issues https://git.launchpad.net/~otubo/cloud-init
Only Eduardo Otubo can upload to this branch. If you are Eduardo Otubo please log in for upload directions.

Branch merges

Branch information

Name:
covscan-issues
Repository:
lp:~otubo/cloud-init

Recent commits

82284e2... by Eduardo Otubo

Fixing static code issues found by covscan

A covscan run on cloud-init found these issues that could be quickly
fixed:

1) unecessary join function used:

  cloudinit/config/cc_lxd.py:
  - log.debug("Creating lxd bridge: %s" %
  - " ".join(cmd_create))
  + log.debug("Creating lxd bridge: %s " %
  + cmd_create)

2) Unused variables:

  tools/uncloud-init:
  - helpmount) helpmount=1;;
  - root=*) rootspec=${x#root=};;

  tools/write-ssh-key-fingerprints:
  - read ktype line < "$f"
  + read ktype < "$f"

Signed-off-by: Eduardo Otubo <email address hidden>

638f09e... by Chad Smith

tests: fix apt_configure_primary to be more flexible

Commit d3e803ad316e6796e5d83e7e8f8f4f7224b92df9 added deb-src comments to
the cloud-init apt templates. This doubled the number of matching entries
seen in /etc/apt/sources.list in apt_configure_primary integration test.

This test was really asserting that GaTech urls were present in
/etc//apt/sources.list instead of archive.ubuntu.com. Fix the test to be a
bit more flexible in case cloud-init changes its bas apt template again.

d3e803a... by Scott Moser

Ubuntu: update sources.list to comment out deb-src entries.

Other installation modes began to comment out the deb-src lines in
/etc/apt/sources.list sometime in 16.04 time frame.

This makes the cloud-init rendered sources.list the same as that
currently present in the lxd images.

The changes here are:
 a.) comment out all 'deb-src' lines.
 b.) move security to the bottom of the file.
 c.) trim trailing white space from 3 comment lines.

LP: #74747

e280004... by Scott Moser

release 18.4

Bump the version in cloudinit/version.py to be 18.4 and update ChangeLog.

LP: #1795741

40768ba... by Scott Moser

tests: allow skipping an entire cloud_test without running.

Individual skipTest or setUp SkipTest will still launch the instance.
This allows us to stop the running of the instance so we don't
waste cycles or boot systems that are known to fail.

Also replace remaining unittest usage in tests/cloud_tests/
with unittest2.

c239eb8... by Scott Moser

tests: disable lxd tests on cosmic

Skip lxd tests on cosmic for two reasons:
a.) bug 1795036 - 'lxd init' fails on cosmic kernel.
b.) apt install lxd installs via snap which can be slow
    as that will download core snap and lxd.

fb5015f... by Chad Smith

cii-tests: use unittest2.SkipTest in ntp_chrony due to new deps

Git commitish fc4b966ba928b30b1c586407e752e0b51b1031e8 changed integration
test dependencies from unittest to unittest2. Use unittest2.SkipTest in
test_chrony to avoid causing tracebacks.

facb92c... by Scott Moser

lxd: adjust to snap installed lxd.

Relax expectation on path to lxc and lxd. The deb path still does
install them in /usr/bin/ but that is overly pedantic.

Add a 'lxd waitready' (present since lxd 0.5) to wait until lxd
is ready before operating on it.

fd873fa... by Chad Smith

docs: surface experimental doc in instance-data.json

27ff9c4... by Chad Smith

tests: fix ec2 integration tests. process meta_data instead of meta-data

Commitish c7555762f3a30190ce7726b4d013bc3e83c7e4b6 changed the variable
names in instance-data.json from hyphenated to underscore delimited. In
the shuffle, meta-data -> meta_data was missed.