Age | Commit message (Collapse) | Author |
|
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.
|
|
Pylint 2.0.0 was recently released and complains more about
logging-not-lazy than it used to. I've fixed those warnings, here.
The changes in rh_subscription are more extensive. pylint may be
complaining incorrectly there, but the tests were not correctly un-doing
all of their mock/patching. This cleans those up and makes pylint happy.
|
|
Newer versions (3.0.1+) of lxd create the 'lxdbr0' network when
'lxd init --auto' is invoked.
When cloud-init is given a network configuration to pass on to
lxc and that config had no name specified or 'lxdbr0', then cloud-init
would fail to create the network as it already exists.
Similarly, we need to remove the device from the default profile
so that the attach code can work.
Also, add a _lxc method and use it to make sure we're getting the
--force-local flag everywhere.
LP: #1776958
|
|
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.
|
|
This has been a recurring ask and we had initially just made the change to
the cloud-init 2.0 codebase. As the current thinking is we'll just
continue to enhance the current codebase, its desirable to relicense to
match what we'd intended as part of the 2.0 plan here.
- put a brief description of license in LICENSE file
- put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0
- simplify the per-file header to reference LICENSE
- tox: ignore H102 (Apache License Header check)
Add license header to files that ship.
Reformat headers, make sure everything has vi: at end of file.
Non-shipping files do not need the copyright header,
but at the moment tests/ have it.
|
|
This adds lots of config module documentation in a standard format.
It will greatly improve the content at readthedocs.
Additionally:
* Add a 'doc' env to tox.ini
* Changed default highlight language for sphinx conf from python to yaml
most examples in documentation are yaml configs
* Updated datasource examples to highlight sh code properly
|
|
Prior to LXD 2.3, the bridge configuration was done through distro
packaging. Thus, lxd module interacted with debconf.
With 2.3 and higher, this is now done inside LXD itself, so we
need to use "lxc network" there.
For now, this perfectly matches what we had before with debconf and
doesn't cover any of the new options. We can always add those later.
A set of tests similar to what we had for debconf has been added to make
sure things look good.
This is tested in Yakkety container running LXD 2.3 and all options seem
to be passed through as expected, giving me the bridge I defined.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
|
|
Some of these really won't work to well on non-supporting
distros so to avoid further user pain tag this with the
supported distros where they should work.
|
|
|
|
|
|
- use util.del_file rather than os.remove
- raise exception if debconf-communicate is not present
- add a trailing newline into debconf-communicate input
|
|
|
|
debconf logic to a function
|
|
|
|
|
|
|
|
A few changes:
a.) change to using '--name=value' rather than '--name' 'value'
b.) make sure only strings are passed to command
(useful for storage_create_loop: which is likely an integer)
c.) document simple working example
d.) support installing zfs if not present and storage_backedn has it.
|
|
|
|
- Handle init cfg separately from main cfg to allow multiple sections under lxd
config to be handled independantly.
- Check for properly formatted lxd init cfg
|
|
If lxd key is present in cfg, then run 'lxd init' with values from the 'init'
entry in lxd configuration as flags.
|