Commit Graph

50 Commits

Author SHA1 Message Date
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
Jonathan Rosser 6403dd594e Remove Centos-7 support
Ussuri is the last release that openstack-ansible supports Centos-7.
Remove support for Centos-7 for Victoria.

Depends-On: https://review.opendev.org/742166
Change-Id: I3e3cda925b9bf8361f2c3a8d6b2a226e50974001
2020-09-22 12:26:52 +00:00
Dmitriy Rabotyagov 9e43b7adc3 Make nodepool vars work with centos 8
Change-Id: Iaf3cea16c2a7e80641a5a3a9af63f2f60f619b52
2020-07-01 20:53:44 +00:00
Mohammed Naser 401fc3d5cd Add LXC COPR cache
Change-Id: I8ea9703179978a9ba7d692422c10b50b20798214
2018-09-12 16:40:51 -06:00
Zuul 1b5b525491 Merge "Revert "Revert "Run with KVM if we can in tests""" 2018-08-18 01:05:23 +00:00
Mohammed Naser bf63b6c689 Revert "Revert "Run with KVM if we can in tests""
Instances are failing to launch on OVH in Tempest runs with the following:
KVM: entry failed, hardware error 0x0

Octavia team reporting the same.

This reverts commit a771ef5a03.

Change-Id: Ib495bddfe5a48ffd8e075eb9e27a8e0c9afb685f
2018-08-17 21:50:15 +00:00
Mohammed Naser 78fe938b69 Add NODEPOOL_LXC_IMAGE_PROXY for faster and more reliable images
We can use that proxy in order to be able to download images
faster and more reliably.

Change-Id: I092d6b404353669d29867e19d95196daffaab84a
2018-08-16 18:04:26 -04:00
Mohammed Naser 7494649561 Use latest hashed RDO repository
At the moment, we are using the 'latest' URL which stale cache
can cause problem in the CI.  This will use a hashed URL which
means we'll always get a consistent run.

Depends-On: Id5281e8f3c2453de12d0ec51b58636433e4e8d84
Change-Id: Iab10493c3fb530dcc6de83adf5891a3fec195609
2018-08-15 15:27:26 -04:00
Logan V a771ef5a03 Revert "Run with KVM if we can in tests"
The nested virt issues we saw on OVH should be resolved now.
More information here: I980cdbc67d6e7b3a8a2520b2279ff3a1cdf68c4b

This reverts commit 748e3d2292.

Change-Id: If2adfc006ee9efb3f80e23d34311673b7c74d274
2018-08-06 11:12:12 -05:00
Jesse Pretorius 4a733c4f9c Remove redundant apt cache update task
There's no reason for this task to be in its own file.
It's not used anywhere but this play. The task also is
not necessary, given that every role does its own updates
when it needs to and the test execution does a cache
update right at the start in order to install the dependent
packages.

All in all, this is a waste of time, so let's just purge it.

Change-Id: I9cc872189b87eb65c4ee7623d4141be41d207f7a
2018-07-14 14:37:28 +01:00
Jean-Philippe Evrard 2d924b773d Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: Ida90a5a717adaf07ebf2ee6f04136fe920cfe46b
2018-07-12 16:44:20 +02:00
Jesse Pretorius 3e1a35e3ca Use 'become' for haproxy service state setting
Due to the use of delegation to localhost in this task,
we also need to set 'become' otherwise the task does not
have access to the socket because it's executed as the
user running the playbook (zuul).

Change-Id: I3da65d9ecdf0a91104b6253466fae80dda01b25f
2018-07-11 10:11:19 +01:00
Mohammed Naser 5fad1fdefa Add MariaDB infrastructure mirrors
Change-Id: I49a744ee5c41279f4a17bc7d2339d12c3a132026
2018-06-28 14:17:47 -04:00
Mohammed Naser fb2d0ce925 Add repo_build pip cache
The repo_build role is not using the cache provided by the OpenStack
infrastructure team, make it use it.

Depends-On: I2e42ef4022aaaa2e1cb9f461e63ce2e9e1f49511
Depends-On: I3df2c670beeb78baaa1515bcd27e8f2b0d95b3a9
Change-Id: I0bec4400ebfcb4bf472c58554ee19525be658a40
2018-06-24 12:09:55 -04:00
Mohammed Naser 70dd6d9b09 Add RDO mirror
Now that we actually have the latest RDO packages, use the mirror
hosted inside the OpenStack infrastructure.

Change-Id: I6c800dcd5b3fc6f7cc1c1e0777d93ab40c6a5e09
2018-06-19 14:56:56 -04:00
Mohammed Naser 41190c4d11 Use the infrastructure provided reverse cache for Percona
We see a lot of timeouts with the Percona repositories so hopefully
with this patch we will be hitting the reverse proxy cache which means
less trips to the internet and less gate failures!

Depends-On: I19be46fc3ac7e8938178d9d8cb4d1dfeadc6f00b
Depends-On: I4d9d408f99608f1625dac9e0802e8d8d77b0f48b
Change-Id: Ieab123e42517c643b69e010a638a677c6363835f
2018-06-18 16:53:16 -04:00
Markos Chandras d849401581 common-tasks: test-set-nodepool-vars: Populate fact for EPEL mirror
We should use the EPEL nodepool mirror when available in order to
improve the reliability of the CentOS jobs.

Change-Id: I565e45159b5979e5e161c749500d0525903e156a
2018-06-12 21:45:39 +01:00
Markos Chandras c3cced9a1c common-tasks: nodepool: Set openSUSE OBS mirror for OpenStack CI
The OpenStack infra are now mirroring the virtualization and cloud
repositories for openSUSE so we don't need to set the OBS mirror
to the official download.opensuse.org anymore. This also ensures
that the task for checking the presence of /etc/ci/mirror_info.sh
is delegated to the host since that file does not exist in the
containers.

Change-Id: Ia530a5901e3e8ec759ba6c79345cbd9a8b7d2b46
2018-05-31 16:51:13 +02:00
Markos Chandras c2030ef974 common-tasks: Do not sync preconfigured /etc/pip.conf file
Zuul places a /etc/pip.conf file on the host as shown below

2018-05-02 11:48:59.945452 | TASK [configure-mirrors : Install /etc/pip.conf configuration]

However, we don't need that since we have our own role to configure pip
which overrides the Zuul one anyway. For the hosts which are not
configured with the pip_install role, this can actually cause problems
so we wipe the file and we let our own role configure it the way we want
to.

Change-Id: I45a900b056db1c8a173f9ed1dae1bd998915e9d4
2018-05-02 14:15:46 +01:00
Jean-Philippe Evrard 62c2b18f3f Use the right hypervisor name for ovh hosts
We set the hypervisor name to 'qemu' instead of qemu, so the
templated fact is "'qemu'", which is an incorrect hypervisor name.

Change-Id: Ib07a93db1d0f826701fd58f95243eb17ef017e4b
2018-04-09 18:08:13 +02:00
Jean-Philippe Evrard 748e3d2292 Run with KVM if we can in tests
We should not Set nova_virt_type.
This way detection steps in, and kvm is used.

However, we should use qemu for OVH hosts:
There seem to be a bug in some OVH hosts
causing 'hardware error 0x0' when trying to run with kvm.

Change-Id: I4f679815ac55095000dc1017cebbd1a8bf0f6c5f
2018-04-04 16:53:56 +00:00
Jean-Philippe Evrard 17439c210c Allow to run tests outside openstack infra
The task run un-conditionally and the shell script
just echo empty strings which are then used for
ALL the deploys, breaking up deployments with wrong
repo urls.

Change-Id: Ia42a400a7729efa7e6b564c83d2de047a4f26887
2018-03-23 16:01:21 +00:00
Major Hayden c36d31d325
Simplify nodepool variable gathering
This patch breaks down the nodepool variable setting into one task
that gathers variables, one task that sets those variables, and
one task that adds in extra variables that require customization.

Change-Id: If838e0db750416db5ae2f534eef6fdf579c5cc10
2018-03-08 15:36:06 -06:00
Major Hayden 391a951f70
Improve idempotency
These discovery tasks always show up as "changed" in the Ansible
output. This patch ensures that they are not labeled as changed
when they are run.

The patch also fixes the idempotency check grep so that it works
properly with multiple hosts. Previously, if *any* of the hosts
finished with no changes/failures, the entire job was marked as
passing the idempotency tests.

Depends-On: I17748b0dd2307fd9bee705140c67883140090298
Change-Id: Ie414d32d39fdeeedd77fe94b57a09ba344084ec1
Signed-off-by: Major Hayden <major@mhtx.net>
2018-03-07 16:02:33 -06:00
Jesse Pretorius db8bd2a79b Use OpenStack-Infra mirrors for tests
When running in nodepool, use the OpenStack-Infra mirrors.

Change-Id: I9ee3d4a8a296a7cb0ae0baf271dd3a06bf4e3874
2018-02-23 22:33:44 +00:00
Major Hayden 6337538173
Set a fact for handling yum's fastestmirror plugin
In the past, we've messed around with enabling or disabling the
yum's fastestmirror plugin. It is helpful if you are running outside
the OpenStack CI system since it will find the fastest mirrors from
a publicly available mirror list.

However, in the CI system, we override the mirror list with a hard-
coded mirror in the `baseurl` line. There's no need to load or use
the fastestmirror plugin in these situations and gathering a list
of mirrors just slows things down.

This patch sets a fact that other roles can check and disable the
fastestmirror plugin when needed.

Change-Id: I8b2a1db084ab47962dbef8c6b037836f44b4ed46
2018-02-13 13:52:50 -06:00
Jean-Philippe Evrard e01a2aecca Fix SUSE gate overrides outside gates
When storing the nodepool information task into suse mirror, the
resulting variable could be storing ansible information, not only
stdout. That could lead to malformed urls for the variable, when
the check is skipped outside gates.

See the value of a repo, containing ``opensuse_mirror`` here:
"{'skipped': True,
  'skip_reason': 'Conditional result was False',
  'changed': False}/distribution/leap/42.3/repo/oss/"

Change-Id: Idfd3c233c2239b642154960b536abe1f7fca7942
2017-12-04 09:44:02 +00:00
Markos Chandras 51f54c323d test-set-nodepool-vars: Fix mirror variable on CentOS7
The mirros are now configured in the openstack-ansible-openstack_hosts
role and the correct variable to set on CentOS is
openstack_hosts_centos_mirror_url.

Change-Id: Iaf3289af1e02a1cafb93577d634477f27a8008be
2017-12-01 13:22:28 +00:00
Markos Chandras d5cda7aacc test-set-nodepool-vars: Add nodepool mirror discovery for openSUSE
openSUSE mirros are now configurable in the
openstack-ansible-openstack-hosts role so we need to make sure we are
using the internal OpenStack ones when running in zuul. This patch also
modifies the code to check for /etc/nodepool instead of
/etc/nodepool/provider because the latter doesn't seem to exist anymore.

Change-Id: I6df997e13f678faaddac8b5d1818f2906bac08ec
2017-12-01 13:19:54 +00:00
Jesse Pretorius 7d3fe3f56c Retry apt cache update
This task is causing some test failures from time
to time. Implementing a retry should help to reduce
transient failures.

Change-Id: I2a71b9f5d8af4ada504072f9236f49be52eafee8
2017-11-20 12:37:56 +00:00
Major Hayden b068c49aca
Unwedge the openstack-ansible-tests gate
This is a combined patch that does two things:

1. Set the LXC download mirror properly

The LXC reverse proxy from nodepool was not being used by the
lxc_hosts role and this patch fixes it.

Closes-Bug: 1716958

2. Pin the keystone role SHA

Keystone has removed various v2 APIs but tempest still wants to
test them. This buys us some time to get tempest fixed and
we can remove the pin.

Related-Bug: 1717011
Change-Id: Idf55daa853ff73602bfe6d2862080bfd874e17f4
2017-09-14 09:59:23 -06:00
Major Hayden ae9b5fee08
Remove RDO install in tests repo
This task breaks the neutron gate by trying to install the RDO repo
as a non-root user. This patch removes this task since it's already
done with the pip_install and openstack_hosts roles.

Closes-Bug: 1715743
Change-Id: Ic711a527510a561b83be834bfa621bb027b2f1b7
2017-09-07 16:11:49 -05:00
Major Hayden afb957d0bc
Discover CentOS mirror in nodepool jobs
This patch discovers the CentOS mirror in the nodepool jobs and sets
a variable to be used by the pip_install role later. This will allow
the pip_install role to adjust the yum repo configuration to use the
best CentOS mirror.

Change-Id: I382b8ef06f5c99de7fa1ce5895bd229867c12535
2017-08-21 15:34:27 -05:00
Jesse Pretorius 9c74fead0e Use LXC reverse proxy and improve UCA repo discovery
This patch implements the use of the images.linuxcontainers.org
reverse proxy when in nodepool, and also improves the discovery
of the UCA repo URL so that it's done in the way that infra
expects it to be done.

The lxc_container_template_main_apt_repo and
lxc_container_template_security_apt_rep fact overrides are
removed as they serve no purpose any more. Those vars were
removed in Newton.

Depends-On: Ia6b149f157e5697d36fdea3dc65cb2ac4815a1a4
Change-Id: I0e27abaea4cac010e9ecdae4dcb1d6cb83ad9d29
2017-08-10 20:54:14 +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
Jesse Pretorius 0a500c1abe Add haproxy install playbook
In order to effectively test rolling upgrades, haproxy
will need to be installed to facilitate the services
being online while the upgrades are happening.

The common task to manage the backend when doing
rolling upgrades is included.

The keystone install playbook makes use of them both
in order to facilitate the rolling upgrades.

Change-Id: I5cbb3824430dc09b36476f81e0cdfd4f0a15f497
2017-06-19 11:12:22 +00:00
Major Hayden ffe9ae3f7e
Use ansible-hardening repository
This patch changes openstack-ansible-security to ansible-hardening.

Change-Id: I711aed6daf6391de71d3c2b47fbfc00fe6b66d9f
2017-05-30 09:22:49 -05:00
Major Hayden 08c4f96e0a
Install RDO release RPM without GPG checks
The RDO release RPM isn't signed, but all of the repositories it
configures have GPG signing enabled. Although CentOS normally doesn't
check GPG signatures for packages that are installed locally, the
security role enables those checks for all local packages.

Change-Id: I7823f386a510e2e35d79f9a1046ad48f7e58db7c
2017-03-27 07:58:58 -05:00
Marc Gariepy aad497c8e5 Stop removing epel
Change-Id: I35eed489b6182634a29e1650c90ef825a528e873
2017-03-23 08:13:06 -04:00
Major Hayden cc2bac16dd Replace EPEL with RDO
This patch ensures that the tests install the RDO repository and that
the EPEL repository is not installed.

Related-bug: 1670012
Change-Id: Ibaa1984093c6643eefa1faee720f4a5f6b0c3b60
2017-03-08 08:54:02 +00:00
Andy McCrae 2249c567c2 Remove Trusty support from tests repository
Change-Id: I66b5bef5ec55b87902bf25f8bc56dfb0d33a5ff1
Implements: blueprint trusty-removal
2016-12-16 10:26:39 +00:00
Jesse Pretorius 2f30848ac6 Only force apt backports for Trusty
The backports repo is only essential for Trusty at this time,
so this patch ensures that this task is only applied to Trusty.

Change-Id: I5026b66a0b263b56d604b06b8efea2eba80447d0
2016-10-16 14:56:55 +01:00
Jenkins d894af2ed7 Merge "Only override UCA repo url on OpenStack CI" 2016-09-06 13:34:06 +00:00
Andy McCrae 44547e2696 Fix the central repository to work with CentOS
Add interface drop for CentOS (Will need to be extended to allow
multiple interfaces)
Add network config files based on ansible_os_family.
Add nodepool tasks for CentOS
Add a default network file for both CentOS and Ubuntu

Change-Id: Ideb84f153fbd9f8f83ff39042f139b25719b39d8
2016-09-02 15:04:43 +00:00
Jimmy McCrory 14ec8b2b04 Only override UCA repo url on OpenStack CI
When testing locally, an Ubuntu Cloud Archive repo may not necessarily
be hosted on the same domain as other existing Ubuntu repos.

Change-Id: I47bc86c8917349e7963c4d02fbc424e5028a5961
2016-09-01 12:40:21 -07:00
Jenkins 8a50e5192a Merge "Removed yum cache update" 2016-08-29 19:26:19 +00:00
Kevin Carter 5958fae428
Removed yum cache update
This command is not needed and is buggy.

Change-Id: Ied18863d194e610d9cd96f74749f70b83f361a1e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 14:09:47 -05:00
Kevin Carter 7bccc59c6e Updated host prep tasks
Change so that local ssh is no longer assumed to be available. The
tasks for keyfile generation and insertion as root are now done
in the same place.

When running on an APT systems the backports repo will be made available
if its found within the sources list file.

Change-Id: I9c16378cee3862cd8ce2d87e8c5483533f98c94d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 18:35:26 +00:00
Kevin Carter 2266ba91ec
Create common task for nodepool specific tasks
Change-Id: Ib8b76b539e27872fec1b2208595c07ce3dfb360e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-26 14:38:55 -05:00
Kevin Carter 7a356aecbd Add tests for the openstack_hosts role
Tests have been added to support the openstack_hosts role.

Change-Id: Ib2ec8840966aea574fef7387cee2ffabd597b4cb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-26 00:05:28 +00:00