Commit Graph

83 Commits

Author SHA1 Message Date
Marc Gariepy abb1c721e5 Cleanup ansible_python_interpreter
ansible_pyhton_interpreter is set to auto, it's not needed anywhere now.

Change-Id: I46843d4e25b1716cf6a095d00c525683a64075d6
2020-06-17 11:14:20 -04:00
Marc Gariepy b72a9dfe94 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: I8d6f16733374e4682c107c4917ab02b814b41f65
2020-06-11 15:59:19 -04:00
Dmitriy Rabotyagov 2c2d130efe Cleanup after repo_build and pip_install retirement
Change-Id: Ic09462a1c0a6596c0846ff6241664f706718ff66
2020-05-12 23:06:31 +03:00
Dmitriy Rabotyagov 0832b3a665 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I3c897a4aac58aeb8ea641839e554c49d5eacb708
2019-12-04 18:22:58 +00:00
Dmitriy Rabotyagov d0fac1b559 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald.
By this we mean dropping rsyslog client installation. log_address is set
by default to /dev/log, which is served by journald.

Change-Id: I6dd0d77004394bb1ad674b53538b0679b056bb0f
2019-07-19 15:10:49 +03:00
Mohammed Naser 4de1219730 swift3: remove support
The swift3 middleware has been deprecated in replacement with the
s3api middleware instead.  This removes all the swift3 references
to hopefully enable someone to cleanly add s3api eventually.

Change-Id: I3a8a1ab861ec81b1f4f8dbc02a6a332d4ce495b8
2019-03-29 09:41:50 -04:00
Jimmy McCrory b9eafb6a48 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: If28f2586017c3813afd4260533c16e4390cebc04
2018-10-20 16:40:04 -07:00
Jesse Pretorius 9e8da77d84 Remove role used for upgrade tests
In https://review.openstack.org/601060 we removed everything
related to the upgrade tests, except the 'previous' role.

Change-Id: I99aad1c3c4ec342c2997b2e59289d60304f1c81a
2018-09-19 21:13:15 +01:00
Jesse Pretorius cd17cb20d7 Remove python-keystoneclient package install
Now that we no longer use our own keystone module, but
instead make use of the ansible runtime venv's shade
library and upstream ansible modules, we can eliminate
this package/library being installed on the host.

To do this, we also ensure that the functional test
now uses the Ansible runtime venv for all OpenStack
modules, and we use the native Ansible OpenStack
modules instead of our own.

Change-Id: I0ecb55308a846ad0f1bb05c10b9e0aad3da15449
2018-09-18 13:19:28 +00:00
Zuul 70978b3cec Merge "Trivial: Fix the pep8 warning" 2018-09-17 04:21:18 +00:00
Jesse Pretorius 386cdb51e2 Clean up role tests
Now that we're using the general templates, we can slim down
the role test definitions. We can also remove tests which are
not being watched, or which are fundamentally broken. With
this we can also remove unused scripts/plays.

We do the following:

1. We remove the 'upgrade' job, given that it's been broken
   all cycle due to the way the job executes and we need to
   regroup to figure out another way to do it. The associated
   scripts are also removed.
2. We remove the 'pypy' tox target. The job was removed some
   time ago, but the tox target left behind. The associated
   inventory is also removed.
3. We remove the 'multireg' jobs. The jobs have been failing
   for some time and are very complex. If multi-region tests
   are re-implemented, they should be done in a simpler way -
   probably best using multiple nodes, rather than trying to
   fudge it on a single host with containers. The associated
   scripts and inventory items are also removed.
4. We rename the 'func_swift3' tox target to 'swift3', and
   reconfigure the job appropriately. The verbose logging for
   ansible is also removed, given that we have ARA to provide
   decent diagnostic output.

Change-Id: I411fcaac9a1ddf17996d771f13b2de7e775e4a60
2018-09-09 11:36:17 +01:00
ZhijunWei 258bae87c3 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: Id2bf058a0b3bceb216861ef21ffa3fcf7a46d32e
2018-09-08 14:36:16 +00:00
Jean-Philippe Evrard 92766000ed 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: Ia1c412489554ab629a8ffa8e385a9b634f471861
2018-07-30 08:39:35 +00:00
Jesse Pretorius b74c397ff5 Add rabbitmq/oslomsg services
The rabbitmq/oslomsg groups are now required by the
keystone role, so we add them to the inventory and
ensure that the test playbook install the services.

Also, the multi-region tests are set to non-voting
to unblock the swift repo for other patches to
resolve the issue.

Change-Id: I4e2bbdff7a89b204723e7937667854c412051347
2018-07-24 16:26:10 +01:00
fpxie dbb88cbe39 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Id26976a9ba87992562024d801f4f7e3ab3504817
2018-06-20 16:11:12 +08:00
Andrew Smith 91af246bdf Update to use oslo.messaging service for Notify
This introduces oslo.messaging variables that define the Notify transport
in place of the rabbitmq values.

This patch:
* Add oslo.messaging variable for Notify to defaults
* Update url generation
* Add oslo.messaging to inventory
* Add release note

Change-Id: I1c2e844c4c7a2256087bcc4521f970ca8e8c6b16
2018-06-11 16:45:16 -04:00
Jesse Pretorius 130e8da005 Do not log passwords
This prevents data to be leaked into the callback plugin.

Some style changes are included to make it easier to read,
the copyright notice is added as it should have been from
the start, and a duplicate retry argument is removed.

Change-Id: I11c3da84fa6469764a19b6a387ef312124dfba2a
2018-04-18 12:57:31 +01:00
Jesse Pretorius 97a448da3e 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: I7d2961028c2182f3ec763c31dd0bd32badf88944
2018-03-28 10:16:20 +01:00
Zuul 1b84ee90dd Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:45:03 +00:00
Jesse Pretorius 4f48b38d97 ansible-role-requirements: Use systemd_service role from openstack namespace
In order to ensure that the updated role is used for tests,
we adjust the a-r-r file to pull from the correct repo.

Change-Id: I454279a048efc2cdad8bc143144ecab2a51e125c
2018-03-25 16:21:26 +01:00
Jesse Pretorius 7b8299862b ansible-role-requirements: Add common python_venv_build role
In order to allow tests to work as the use of the common
role is implemented in the various roles, we pre-implement
the addition of the role into the a-r-r file.

Change-Id: Ie48b3f33a25a026bf07c98569b6fa72c861a86cc
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:21:44 +00:00
Andy McCrae 5dcc7d99d8 Re-enable the erasurecode storage policy for RHEL
We disabled the erasurecode storage policy for CentOS builds, because
the version of liberasurecode caused issues in some gate jobs.

The release of pike now means that liberasurecode 1.5.0 is setup by
default, which resolves this issue. We should re-enable the
erasure code storage policy.

Change-Id: I96a2609bad7d1bcc9faf85d3561d00c8e047c18a
2018-03-17 12:03:19 +00:00
Jesse Pretorius 92bebfd33a ansible-role-requirements: Add common systemd_service role
In order to allow tests to work with https://review.openstack.org/551028
merged, add the role to the a-r-r file.

Change-Id: I6346d1d65309de78e6f4fa77f5e880fff6be9b2f
2018-03-13 16:52:16 +00:00
OpenStack Proposal Bot 4108ea1407 Updated from OpenStack Ansible Tests
Change-Id: Ia775593ae45a22ce25aa0faef41907cfdb643428
2018-02-16 16:19:17 +00:00
Charles Farquhar ea0d7bdb3e Add basic functional testing for swift3
This commit adds the following swift3 functional testing:

 1. Install and configure `s3cmd` utility
 2. Verify bucket creation
 3. Verify object upload
 4. Verify object listing
 5. Verify object and bucket deletion

Change-Id: I6290e8b02004f6c518983700a6439d28fbd127a4
Co-Authored-By: Jean-Philippe Evrard <jean-philippe@evrard.me>
2018-02-16 09:48:06 +00:00
Jean-Philippe Evrard 7ab62ddbea Lay out a clouds.yaml file before upgrading
Upgrades use the clouds.yaml instead of environment variables
to test APIs. Swift doesn't have openstack_openrc in meta, and
no role that applies to localhost in the whole functional test
path has it. So we have to include openstack_openrc role.

Change-Id: I5196ab338659c65a6a3b7ac03095bbfb1e26c0a8
2018-02-16 09:06:03 +00:00
Zuul 37eb776041 Merge "tests: test-swift-upgrades.sh: Drop Ansible verbosity" 2018-02-09 14:12:43 +00:00
Markos Chandras 3d662f3080 tests: test-swift-upgrades.sh: Drop Ansible verbosity
The upgrade tests are very noisy since Ansible verbosity is set too
high. This makes debugging problems very painful so drop the verbosity
level and let users increase it if desired.

Change-Id: Id256efff664c58d62aaf7b9e23c7df6953032573
2018-02-09 12:09:05 +00:00
Jean-Philippe Evrard 45bab4b6ac Use a venv with previous ansible version for upgrades
When doing the role upgrade, we run every playbook with current's
branch ansible. This is normal for the infrastructure bits (which
are running on current branch), but not for the installation of
the previous branch's role, which should use previous branch's
environment.

Depends-On: I7ebb045885dd645b820de2b7f75b46c755c015f6
Change-Id: I7069c906395b37e8af20db82d88d8a069faf5f79
Related-Bug: #1741471
2018-02-01 10:45:59 +00:00
Jean-Philippe Evrard ae5def5f8f Fix upgrade test
openstacksdk was updated to 0.10.0 which has a different
connection.Connection object, which doesn't take our auth_url.

We should respect the constraints, install the tooling in a venv,
and restrict to a known version of the sdk until more robust code
is written.

Change-Id: Ibcfe3d69705833b0c743e6303feb351a464abdcf
2018-01-19 17:07:23 +00:00
Markos Chandras a7b4d86599 tests: test-swift-upgrades.sh: Remove the exit trap
We are already collecting logs as part of the post-run playbook so we
don't need to do that as part of the exit trap. This avoid collecting
and compressing the logs twice.

Change-Id: Iacbdd102e8889ae09ee2c93e300a87ba4ffc4842
2017-12-16 13:34:26 +00:00
Jean-Philippe Evrard 7edad7c2b4 Fix Ansible Lint
Change-Id: I4dee9fc51cabf0923e479605a02f6fb462815943
2017-11-27 12:20:50 +00:00
Jean-Philippe Evrard 0147d155d4 Update upgrade role for Queens from P
This changes the a-r-r with the proper version, and fixes
the repo path for role upgrades:

The role will, during test-upgrade-pre, have its current branch
checked out, and will deploy the current branch infrastructure,
including the generation of the constraints.

Then, the installation of previous branch of the role will use
the constraints for its previous version, but will have no
constraints for it, and fail.

We need to generate the constraints for the previous version too.
This should do it.

This patch also implements an initial set of jobs intended to
match the current job execution method. It does not intend to
improve how the jobs are executed - only to replicate what is
currently in openstack-infra/openstack-zuul-jobs and provide
the platform to iterate on.

Change-Id: I4aa7591c931501490e706b9d61ba0bc12c006baa
2017-10-17 20:52:25 +00:00
Jesse Pretorius 1837d9bca6 Update upgrade role for Pike
Change-Id: I6e672c0d6b9c9a5ebca7cf47dea9f417f2201b46
2017-08-23 13:14:21 +01:00
Major Hayden fa9f41f823
Optimize swift gate
This patch contains five combined improvements.

1) Remove RabbitMQ from the gate

RabbitMQ is only needed in the swift gate if the ceilometer
middleware is being deloyed. This isn't enabled in the gate
job, so let's save some time and deploy memcached/galera
without RabbitMQ.

2) Bindep pyOpenSSL change

This commit also includes the pyOpenSSL bindep change in the
hopes that we can get the swift gate moving along again. ;)

3) Disable erasure code test for CentOS

Due to #1707220 we are running into issues with CentOS 7 running Erasure
Code storage policies on RAX hardware.

This patch temoprarily disables EC testing for CentOS 7, but we can
re-enable that once the package is backported to stable/ocata branch.

4) Pass packages as a list

This patch passes a list of packages to the package module
rather than using "with_items" and it should speed up the
package installation process.

5) Set package state to present

Change-Id: Ic7b13853ce00b0f8ac2181e46e2bd8dea5ce377e
Co-Authored-By: Andy McCrae <andy.mccrae@gmail.com>
2017-08-09 08:43:25 -05:00
OpenStack Proposal Bot ec7448f57c Updated from OpenStack Ansible Tests
Change-Id: I2887e9bda1f6ce462c66f849133639f263a42248
2017-06-22 15:20:04 +00:00
Nolan Brubaker e8388fd4cb Add Swift API availability test during upgrade
Run API tests while upgrading the service and report the results once
finished.

Change-Id: I02339d0ae182c07fb2f136ad23f0ec02672cdbe8
2017-06-06 16:47:03 -04:00
Andy McCrae 5de40ebea4 Use upper constraints when installing test requirements
Change-Id: I78dcbcd59c298ac165eab9e15788d408cc344115
2017-06-02 12:34:51 +01:00
Andy McCrae 33fc6b7673 Allow the developer constraints to be adjusted
In order to do a developer mode that allows installation of packages
from local file, which take precedence over the developer_mode
constraints, we need to allow the order of the constraints to be
changed.

This patch adds a "pip_install_developer_constraints" var which is used
to set the developer mode constraints. By default this will leave the
same behaviour but will allow additional constraints to be added, or the
developermode constraints file to be overriden altogether.

Change-Id: I67f880def4b16e519865cc18937807e80b0b82c8
2017-05-26 11:59:33 +01:00
Jesse Pretorius 49d9c4a71a Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: Ie1a48685f48cd5074031d58478a541967a01be42
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 17:40:00 +00:00
Jimmy McCrory 9e1824d3be Fix role gate tests for Ansible 2.3
'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 so
'ansible_become' should be removed from its host_vars.

Change-Id: I3b56a8c2df670423a2cb4e473379028e23bb01bd
2017-04-23 00:43:38 -07:00
Andy McCrae d62d6a23ac Remove double swift-host setup run in testing
This happens as part of the swift-install play already.

Change-Id: I81a94fa6b9efc6396ef21e5a06fa728dadb23d14
2017-04-04 14:07:16 +01:00
Andy McCrae c578ebfde0 Fix "pretend_min_part_hours" for MR swift tests
When running a MR swift deploy we rebalance the ring in quick
succession.

To do this successfully we need to set the
"swift_pretend_min_part_hours_passed" to True. This shouldn't be needed
in a regular deploy, or a deploy where rings don't change.

Change-Id: Ib86dcfbdb5f6346e2c7da67b6bf2b29c62f99dab
2017-03-29 15:43:28 +01:00
Andy McCrae 57de3c8817 Check if changes have made before attempting a rebalance
Utilize the "ringbuilder.devs_changed" option to ensure that the ring
needs a rebalance. This will prevent unnecessary rebalances that cause
failures due to "min_part_hours" not being passed even though no changes
were required.

Additionally, we can now return a correct Ansible repsonse when the ring
has changed/rebalanced - and return "OK" when it hasn't returned at all.

Change-Id: I1fb4b3544a50ab5f566b3846d616107a84ff29c9
2017-03-20 13:03:32 +00:00
Andy McCrae 44cdfed99d Move swift upgrades into its own shell script
The upgrade path becomes complicated as previous variables are stored
and we have to start a clean run.

The best way to achieve this is to separate the run steps out in a shell
script for upgrades only.

Change-Id: Ib2d2c8bad5241779d52cdc9428d7057c770d2d7c
2017-02-16 17:04:15 +00:00
Andy McCrae 0e45afbd91 Split upgrade test into its own play
To avoid requiring all the os_previous_swift tasks to be evaluated, we
should split the 2 tests up. This will help make the gate more efficient
and avoids unnecessary issues.

Change-Id: I105d0c49f1b5dc78e1e5a5c7334cd81ecc455056
2017-01-20 16:42:00 +00:00
Jenkins f9213a7ae0 Merge "Attempt to fix swift_pypy memory issues" 2016-12-03 03:14:08 +00:00
Andy McCrae 3fb6784459 Attempt to fix swift_pypy memory issues
Move to use tempauth to resolve memory issues resulting from an AIO
swift install running in pypy.

This PR adds some options for using pypy:
* Set a pypy Garbage collection value

This PR includes some tempauth fixes to make it useable:
* Set the tempauth users based on a variable

Testing is changed as follows for pypy:
* Use only memcache within swift-proxy
* Remove galera/keystone
* Add swap for swift-storage hosts
* Use tempauth for pypy
* Reduce to 2 swift hosts

Change-Id: Ic1ed5acc9b20853d9a159035226f97fda088f035
2016-12-01 11:07:10 +00:00
Andy McCrae a5e3fa7180 Swift upgrade testing.
Implement upgrade testing for os_swift role.

This patch adds an upgrade testenv, which configures a previous version
of swift, and the test-vars from the previous stable branch to be used
by the previous version of swift.

We don't run functional tests after the initial stable/newton deploy
because a working stable/newton branch is already tested, and it's
assumed it worked if the upgrade works too - which is more efficient.

This follows the pattern setup for Keystone in:
https://review.openstack.org/#/c/384269/

Change-Id: Icefc1c75b814b9d7dc5e79422e975346b9482e9d
Implements: blueprint upgrade-testing
2016-11-22 09:53:52 +00:00
Andy McCrae 42acde5ee9 Add CentOS7 support for Swift
This PR Adds CentOS 7 support for Swift.
The following was required to get CentOS 7 to work:
* Add yum install path + packages
* Variablize rsync service name
* Gather network interface facts prior to setting storage/repl IPs
* Ensure /etc/defaults/rsync is only set for apt installations.
* Ensure the rsyslog service is started and enabled.

Change-Id: Ibaf8bc8d54b55820e8b527b52940c61c05c732d8
2016-11-14 17:03:02 +00:00