Commit Graph

22 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov bc258b4e19 Deprecate OpenStack-Ansible nspawn repositories
Since nspawn support has been removed with [1] we now
start repositories deprecation process.

[1] https://review.opendev.org/c/openstack/openstack-ansible/+/782569

Depends-On: https://review.opendev.org/c/openstack/project-config/+/797723
Change-Id: Ic80477b87a3ddc74ac1712f6bd4c3aba284fa1cb
2021-06-23 20:24:41 +03:00
Marc Gariepy e20e45fd41 remove ansible_python_interpreter
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
2020-06-11 15:59:10 -04:00
melissaml dc13e6565d Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Idc14e934fc5a10cdf81055bc22c76cd9c5c8aa9e
2019-07-10 22:00:37 +08:00
Kevin Carter 3279aed459 Remove the private option from include_role
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>
2019-02-22 00:49:34 +00:00
Zuul 572b5768bd Merge "Trivial: Fix the pep8 warning" 2019-02-11 13:55:32 +00:00
Kevin Carter 6056124447 Add path variable for different distros
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>
2019-01-31 11:21:49 -06:00
melissaml 2fa5d8af22 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I5f2b69e84ecbca1bede3019cb601b5bce69193a6
2018-11-08 20:02:18 +08:00
Jimmy McCrory e5ea3378ad Set container_name as host_var in test inventory
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
2018-10-20 15:28:29 -07:00
Kevin Carter b2df99498c
Add test for host_only networks and ensure network ordering
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>
2018-10-08 18:07:51 -05:00
Zuul da90404a6e Merge "Correct test register" 2018-06-22 20:10:33 +00:00
Kevin Carter 7e2c1dd197 Update role to accomodate testing change
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>
2018-06-21 05:40:50 +00:00
Kevin Carter 1b34a925ad
Correct test register
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>
2018-06-21 00:15:54 -05:00
Zuul a6da429a0e Merge "Add networkd prefix when creating networks" 2018-06-02 01:57:41 +00:00
Kevin Carter a57ceed5ef Add networkd prefix when creating networks
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>
2018-06-01 23:25:02 +00:00
Kevin Carter 09d5e7e442 Add networks for local testing
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>
2018-06-01 23:24:55 +00:00
Jonathan Rosser 59e4ba865a Add test for container specific extra network interface
Change-Id: Ia13c037640eea751edfe521009144d12a6684c44
Depends-On: I0cfed0ad6cce99c420c31920446e0a69a82fa602
Depends-On: I5346fdf81967d6eb7f69e61a187166c076ca4b60
2018-06-01 22:26:30 +00:00
Kevin Carter e48838fef3
Use networkd role to setup test networks
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>
2018-05-19 01:07:06 -05:00
Kevin Carter f3421d7687
Correct contianer network creation and test it
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>
2018-05-15 13:31:38 -05:00
Kevin Carter 32f3ffdcbc
Update role to gate using all supported distros
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>
2018-05-14 21:33:05 -05:00
Jesse Pretorius 997f74afa3 Remove tests-repo-clone.sh
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
2018-03-28 10:12:05 +01:00
OpenStack Proposal Bot 774688ca92 Updated from OpenStack Ansible Tests
Change-Id: I8af17a7a72af78c32f0b136fdcd806c0e3e3063c
2018-02-22 20:43:38 +00:00
Kevin Carter 627d5107cc
First commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-02-06 22:37:24 -06:00