Commit Graph

33 Commits

Author SHA1 Message Date
Jonathan Rosser 84eea5b91d Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I9841e5b7f32f452b7da0c643cb6c3e0e30d9e413
2021-03-17 12:20:20 +00:00
Zuul 5e46a70a74 Merge "Clean up code from unsupported operating systems" 2021-03-12 22:06:54 +00:00
Jonathan Rosser 4eac7fd2c1 Clean up code from unsupported operating systems
Remove SUSE, Gentoo, and references to yum package manager.

Change-Id: If591661b4145219f7837960f93bc9647b60d2a70
2021-03-11 23:08:21 +00:00
Andrew Bonney cb879e3a4c Adjust modules path for Neutron test containers
Current path uses a symlink which the LXC process refuses to
bind mount due to security checks.

Change-Id: Ifcb368dedc70aab2cf0c2a86de233939aaba29f9
2021-03-11 09:23:25 +00:00
Dmitriy Rabotyagov 8be6bebe6e Fix neutron functional test
We broke neutron functional tests previously when dropped
compatability with lxc2 so we should fix them now.

Change-Id: Ic2f425a6d9780624596ec6cb1bcf40fef9d8951f
2020-10-16 19:15:08 +03:00
ZhijunWei b2bce755e0 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I55394d053218016be20fa9b2c92cefc1473d5c64
2018-09-09 08:04:47 +00:00
Zuul 7f64a67d59 Merge "Remove all MQ vhost/user creation tasks/vars" 2018-07-31 14:47:52 +00:00
Jonathan Rosser 2b432ccb73 Add lxc3 compatibility to tests
lxc3 deprecates many legacy config keys [1].

[1] https://discuss.linuxcontainers.org/t/lxc-2-1-has-been-released/487

Change-Id: I791309c29d7aee41fa7f79bbb2b6de122ada995d
2018-07-29 20:47:06 +01:00
Jesse Pretorius 3e595367db Remove all MQ vhost/user creation tasks/vars
There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we remove the test-vars which were duplicated from the
role, and remove the MQ setup tasks as they are no longer required.

Change-Id: Ib515630c8fbf793258b40f15a4c9f2c18c4c7531
2018-07-27 13:19:10 +01:00
Jesse Pretorius 839aec5abe Ensure remote_user and become are consistently implemented
It makes no sense to use become when you're connecting to a
host via the root remote_user. As such, we remove all uses of
'become: true' from the test plays with the exception of the
'test-prepare-keys.yml' playbook which uses a local connection
rather than a remote one and it therefore needs to use become.

We also transition all plays to use 'remote_user' which is the
correct parameter to replace 'user' (since ansible 1.4).

Finally, we switch the horizon nova service setup to its own
playbook using a local connection and the upstream keystone
modules.

Change-Id: I20517c22f07b1bb811a51d8c63741604360fe7f8
2018-07-06 09:45:29 +01:00
Mohammed Naser adc796b960 Add retries to install packages required for Neutron
Jobs sometimes fail and timeout on this task so adding retries
to make it less prone to CI failures.

Change-Id: I4ecad7ecf56962fc272989a8fafc66b0ff1e5185
2018-06-17 10:04:39 -04:00
Jesse Pretorius b83eebd336 Move database creation into role (neutron)
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we remove the test-vars which were duplicated from the
role, and remove the DB setup tasks as they are no longer required.

Change-Id: I0c40e3b9493e8c5b2c1009a9aae8fe78e963c074
Depends-On: https://review.openstack.org/571781
2018-06-01 18:07:12 +01:00
Jesse Pretorius b869d59953 Only setup rabbitmq when the inventory group is present
With the merge of https://review.openstack.org/569061 the
roles which do not have the rabbitmq_all group are failing
with messages like:

'dict object' has no attribute 'rabbitmq_all'

This patch ensures that the tasks are only activated if the
inventory group is present and populated.

Change-Id: I8f9004147753bb7f8121e344379417a6d6e2e807
2018-05-30 13:17:27 +01:00
Jesse Pretorius d1d0d21564 Optionally use the old rabbitmq setup tasks
With the merge of https://review.openstack.org/559127 the roles
which do not yet have the oslomsg_rpc_all/oslomsg_notify_all
groups are failing with messages like:

'dict object' has no attribute 'oslomsg_rpc_all'
'dict object' has no attribute 'oslomsg_notify_all'

This patch puts the old ensure-rabbitmq.yml task include back
and activates it when these groups are not defined.

Change-Id: I90dcd122fbc96f7737363dd353b50a516122667a
2018-05-17 10:25:18 +01:00
Andrew Smith 7c756b1f91 Update to use oslo.messaging services for RPC and Notify
This commit contains updates to introduced oslo.messaging
service in place of rabbitmq server.

This patch:
* Add ensure oslo.messaging vhost and user for backend
* Update service role installs
* Add oslo.messaging settings to test-vars

Change-Id: Ie69d522ee2df4282ce4fc69c2b3f81f4df1da77d
2018-04-30 16:35:22 -04:00
Andy McCrae b44ad35b85 Run neutron in parallel
Our CentOS builds for Neutron are taking quite some time with the
containers running in serial, this patch moves to build these in
parallel for role testing.

Change-Id: I07b5b0914da340122a85723e7fdb0e1c512578c7
2017-08-22 14:48:28 +00:00
Major Hayden 354eb1ac81
Add dnf support
This patch adds dnf support for CentOS.

Implements: blueprint centos-and-dnf
Change-Id: I0609d79e98d773af8e431bd520b04a2c893211bc
2017-08-02 15:02:02 -05:00
Jenkins 79e11d35d2 Merge "Implement any_errors_fatal for all test playbooks" 2017-07-17 17:32:51 +00:00
Jesse Pretorius dad9515c35 Implement any_errors_fatal for all test playbooks
Sometimes a test will result in a failure, but it
takes more time than necessary to find the failure
due to Ansible continuing to execute on other hosts
after removing one from the play execution.

This patch ensures that any error will result in
an immediate failure so that the fatal error is
easier to find.

Change-Id: I4e89bfdb1e48d0ac65f9fb8549e55a19ab773f9f
2017-07-17 10:09:11 +00:00
Jesse Pretorius d5d1121f3c Remove redundant run_once task args
The included task set already uses run_once,
so the run_once on the include is unnecessary.

Change-Id: I1ec4151bb8f87bac5dd76ab37c1dc4ed53b1c7c9
2017-07-06 13:21:42 +01:00
Markos Chandras 0bee3ae3c2 test-install-neutron: Add openSUSE support
Add openSUSE required packages and kernel modules path

Change-Id: I17754aa067c5c77a376c136121f6192336527a28
2017-07-05 09:42:23 +01:00
Jesse Pretorius 165851a4e3 Update neutron test playbook
This updates the neutron test playbook to:

1. More efficiently execute the dependent package
   installation, while being flexible enough to
   cater for more package managers.
2. More efficiently execute the preparation of
   the neutron agent containers by consolidating
   tasks, using a dict for the kernel path and
   consolidating the container config into a
   single task.
3. Splits the implementation of the neutron
   server service from the rest to allow the
   role to be able to use different hosts for
   different services.
4. Use the built-in functionality of the neutron
   role for the checksum metadata fix.

Change-Id: I548971e2de92280fe2cc4ff0a6a926497733fa7d
2017-07-04 15:54:20 +01:00
Jesse Pretorius 742a3f8e24 Fix missing vars for container connectivity test
Change-Id: I735ae5b59596a46bd0a1dcfe37d5418e79f5b53e
2017-04-28 17:34:09 +01:00
Jesse Pretorius b575dc7951 Use wait_for_connection instead of wait_for to check container
After configuring the bind mounts in the container, we used a
task to wait for SSH to respond on the container, using the
Ansible wait_for module trying to connect to port 22.

When managing containers in Ansible using other connection plugins
that use LXC commands on the physical host to execute modules,
there may not be an SSH daemon running within the container. In
these situations we can accomplish the same check without SSH by
using the wait_for_connection module (new in ansible 2.3) to verify
that Ansible has a working execution path into the container, but
not necessarily via SSH.

Change-Id: I25978a3043af1df1613f41e479b7f058d64f685d
2017-04-28 13:12:32 +01:00
Rick Box c8790db909 Bugfix for wait_for_ssh for waiting for connectivity
Bug: https://bugs.launchpad.net/openstack-ansible/+bug/1682481 this
causes issues when using an SSH gateway yet this is simply doing a basic
check for port 22 connectivity.

Change-Id: Ia3c82fcef553b6a53f66d22b9cfdcf5d69e8694d
2017-04-27 18:10:39 +01:00
Jimmy McCrory 53d9f35023 Add become to neutron install play
This was missed in I08cada62636a1a7a1e2c1b15e0052876437e24aa

Change-Id: Iefe86bbebac49efb6a3a98b5e070ff11e7fb07b2
2017-04-24 10:54:47 -07:00
Jimmy McCrory 18309b13da Add become to plays that delegate to localhost
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.

In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost. It will also
need to be defined in plays that delegate to localhost.

Change-Id: Ifb5e907594ca5fba459ee5a90b202e17db081f9a
2017-04-19 12:01:01 -07:00
Marc Gariepy 32bcd744e4 Fix CentOS package installation
Add missing yum packages for neutron/nova/swifthost tests.

Change-Id: I4c954ca8517ae1d456eda4f841cf64da233a78cd
2016-10-03 10:22:39 -04:00
Jesse Pretorius 5a8a872b0c Provide OS-specific kernel module path
The kernel module bind mount path is different between
Ubuntu and CentOS. This patch provides the right value
based on the platform.

Change-Id: I6e604414707036e71b3e6ec849bcf18f6f4881a8
2016-10-01 17:57:32 +01:00
Travis Truman 1943251152 Address ansible_ssh_* var deprecation
Replacing usage of ansible_ssh_host, ansible_ssh_user,
ansible_ssh_port with ansible_host, ansible_user and ansible_port
Depends-On: I35371879a87c115f219cd181245fe59f6d7d3f77
Change-Id: I97c3958c406b44b271d361860516d0b903438a83
2016-09-19 11:06:48 +01:00
Travis Truman 1869a67440 Remove unused hostname var from test playbooks
Neither the rabbit, nor galera common tasks use
the hostname var that was defined, so we can remove
the var from all test playbooks.

Change-Id: I92c85c2c5c53f4e3d028debcfe925c26ad84284b
2016-09-12 09:08:38 -04:00
root 7f03b7fdc4 Added tasks in nova and neutron test yml files
Moved Rabbitmq and DB tasks to generic files.
This patch removes the redundant behaviour of the tasks such
as Ensuring Rabbitmq hosts and user, creating db, granting access
to db in the testing yml files. The patch  makes it more generic
and shifted the common tasks to separate files create-grant-db.yml
 and ensure-rabbitmq.yml

Change-Id: Ibd94e1ebdce45b782ab447ca3db5068588a1e368
2016-08-24 16:35:18 +00:00
Andy McCrae 7e95e72303 Add Nova vars/plays 2016-05-26 11:33:20 +01:00