ansible_python_interpreter is now set to auto in the tests repo.
it doesn't need to be overwritten in the test anymore.
Depends-On: https://review.opendev.org/734676/
Change-Id: I2d62651eeac1393412877da9303ae740d756c2f3
The private option on include role was never implemented and
will no longer be developed. This change removes the option
so ansible no longer raises a deprecation warning.
Change-Id: I7678c1a5de07cda066dcf1e24684300fef56e0ba
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This change removes the assumption that ip and iptables are always in
the same location on any distro by setting the specific tool path per OS
package manager type.
This adapts the pattern set here:
fc9a2d03dc/tests/roles/bootstrap-host/defaults/main.yml (L106-L118)
Change-Id: Ie627a5b5ec3984ea6883e184f55a2fb2034e2d92
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.
Change-Id: Iff8afbad1ef28b288c4ea403e6d4dc811b4b8a45
The `host_only` network option did not have a functional test, this
change adds one so that the mv-extra interface will now run with this
which will ensure its functional when enabled. The "nspawn_combined_networks"
also had an issue where the first network in the container config could
be something other than the nspawn container network. This would shift
the gateway from the mv-nspawn and to whatever was defined first. A
change to the "nspawn_combined_networks" will now ensure
"nspawn_networks" is referenced first.
Depends-On: Ic280db301ce44b98ac35c8911999dec5fa263a29
Change-Id: Id20afab8b705f6528ba5575ee4704c1661e6e65c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The nspawn container create role needs to have it's tests updated
because local connections that are delegated to remove containers no
longer works as it once did. This change simply uses the all_containers
group and the known connection plugin to ensure we're able to run the
same tests.
Depends-On: Iab422c718d789ef13b8ec55938fdb7e73e40061b
Change-Id: I4d845ef065745e93651ac1853c05747bf26d6631
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This change corrects the name of a register used to cleanup containers
when running tests multiple times. While this register would not harm a
normal run, it does cause issues when re-running the tests due to the
fact the variable is used to determine if a container is removed and it
is undefined at this point.
Change-Id: I4e0c07c4047ccdde3becfb7345d2564bef0489da
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
systemd networkd is a shared directory of networks that needs to be able
to co-exist with the host which may be using networkd on it's own. This
change adds an nspawn specific networkd prefix to the interface files to
ensure we're not creating interface file collisions.
Change-Id: Id849fb69a6ec71dc3fa66e30e17b6143c81f5cc8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The local testing was not working because it's not importing all of the
gate magic. This changes the test setup to ensure it has all of the
required bits.
Change-Id: I2940e8e0545678c0d6860f8e6fd1cf75cf9e1101
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The test networks were being setup using networkd and a custom template,
this change updates the process so we're dog fooding.
Additionally change the container config drop so that its executing a
container restart when needed and in the right order.
Several tests were removed because they are basic operations which are
already being tested in the nspawn_hosts role.
Change-Id: I50799d53f8d75f043ed12d4e50da3d55a4ee159a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The container network creation process needs to assume that the bridge
name is available and fall back to the interface. Previously this was
being done in reverse.
Change-Id: I51829349b5bc3f97c100a379b13f7e99f4007228
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The changes here remove the boiler plate code we had in favor of using
all of our common roles. This also updates the nspawn role using some of
the learnings we've had from our recent LXC changes and ensures we're
not breaking any compatibility we had with our various distros.
Add option to run a full config update if required
> As a deployer I need the ability to make a sweeping change to container
configs if required. At present the nspawn container create role will
attempt to preserve the configs and update only what's required, which
is desirable when maintaining uptime. This change provides the option
`nspawn_container_preserve_config` which, if set to "false" will
template the container configs instead of trying to preserve it.
Document everything in config
Change-Id: Ie969c10578e1102767ad8991c9d6171b547aef87
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.
Change-Id: Ic1cbcff32d98255d12136b4676e1e59ab9aa2386