~chad.smith/cloud-init:fix-device-path-from-cmdline-regression

Last commit made on 2017-10-23
Get this branch:
git clone -b fix-device-path-from-cmdline-regression 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:
fix-device-path-from-cmdline-regression
Repository:
lp:~chad.smith/cloud-init

Recent commits

00fdcd6... by Chad Smith

add comment about using FilesystemMocking instead of os.stat mocks

6d58f22... by Chad Smith

drop rootdev_from_cmdline duplicate definition from cc_resizefs as we use util.rootdev_from_cmdline. Adjust unit tests to test util.rootdev_from_cmdline instead of cc_resizefs.rootdev_from_cmdline. Replace jsonschema in requirements.txt

ae4efbd... by Chad Smith

in making resizefs more testable, I broke interactions with kernel cmdline. fix regression where maybe_get_writable_devpath reads and updates root device based on kernel commandline

c58a1b0... by Chad Smith

wip drop jsonschema

5b6fd3a... by Scott Moser

tools: make yum package installation more reliable

During continuous integration tests, we're seeing quite a lot of
unreliablity when running 'yum install'. The change here is to move to
re-trying a run of 'yum install --downloadonly' for 10 times or until
it succeeds. Then afterwards, running yum install from the cache.

This seems safer in general than just re-trying an install operation,
since we are specifically affected by the download phase failing.

Also present are some flake8 fixes to tools/read-dependencies.

c06eea9... by Scott Moser

citest: fix remaining warnings raised by integration tests.

There was fallout in a full integration test run from my adding of
test_no_warnings_in_log which asserted that there could not be a WARNING
found in the /var/log/cloud-init.log

This fixes 2 of the cases:
 * TestCommandOutputSimple had a valid WARNING written, so adjust its
   test case to allow for that.
 * TestLxdDir had a valid config in the test but the module would
   log a WARNING, so fix the module.

Also updates lxd unit tests to look for WARN themselves.

a51968d... by Scott Moser

citest: show the class actual class name in results.

Tests are currently run by creating a temporary subclass of each class
and then executing it (in get_suites). When running the tests suite
the output would contain the temporary class name. That was less than
useful, and made batch runs almost impossible to identify which
test case had an error.

This change goes from output of:
    FAIL: test_no_warnings_in_log \
        (tests.cloud_tests.testcases.get_suite.<locals>.tmp)
To
    FAIL: test_no_warnings_in_log \
       (tests.cloud_tests.testcases.modules.ntp.TestNtp)

6bc504e... by Chad Smith

ntp: fix config module schema to allow empty ntp config

Fix three things related to the ntp module:
  1. Fix invalid cloud-config schema in the integration test which
     provided empty dicts instead of emptylists for pools and servers
  2. Correct logic in the ntp module to allow support for the minimal
     cloud-config 'ntp:' without raising a RuntimeError. Docs and schema
     definitions already describe that cloud-config's ntp can be empty.
     An ntp configuration with neither pools nor servers will be
     configured with a default set of ntp pools. As such, the ntp module
     now officially allows the following ntp cloud-configs:
     - ntp:
     - ntp: {}
     - ntp:
         servers: []
         pools: []
  3. Add a simple unit test which validates all cloud-config provided to
      our integration tests to ensure it adheres to any defined module
      schema so as more jsonschema definitions are added, we validate our
      integration test configs.

LP: #1724951

ee90a6c... by Joshua Powers

tools: disable fastestmirror if using proxy

Per centos documentation using the fastestmirror plugin is effective at
finding the fastest mirror, unless you are behind a proxy. In that case
you should disable it. Therefore, in our tests if we are setting the proxy
we should also disable the fastestmirror plugin.

41152f1... by Scott Moser

schema: Log debug instead of warning when jsonschema is not available.

When operating in expected path, cloud-init should avoid logging with
warning. That causes 'WARNING' messages in /var/log/cloud-init.log.
By default, warnings also go to the console.

Since jsonschema is a optional dependency, and not present on xenial
and zesty, cloud-init should not warn there.

Also here:
* Add a test to integration tests to assert that there are no
  warnings in /var/log/cloud-init.log.
* Update one integration test that did show warning and the related
  documentation and examples.

LP: #1724354