Commit Graph

81 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 31a892134d Cleanup after repo_build and pip_install retirement
Change-Id: I7649813882f5f00c8ba50989183d4e66340a0e06
2020-05-12 21:24:39 +03:00
Dmitriy Rabotyagov ee018d9083 Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Depends-On: https://review.opendev.org/678025/
Change-Id: Ieac6d03a436f6b706d7f12e292ffc98171a43246
2019-09-04 15:34:37 +03:00
melissaml 223168861c Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I4aa0e2bce0858a3b038850e89fa652f40429b701
2019-07-11 09:32:16 +08:00
Jimmy McCrory 981611b35a 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: I61349ccb4846f4e4c382dee910f48ec872d053cc
2018-10-20 15:28:29 -07:00
caoyuan d3a91554f9 Switch include to include_tasks or import_playbook
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: Id654f07d18269f621df203b0808b69a75b13bc12
Closes-Bug: #1792761
2018-10-04 23:58:07 +00:00
Zuul 020ba62c2a Merge "Trivial: Fix the pep8 warning" 2018-10-04 08:48:14 +00:00
Jesse Pretorius 939df55739 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 'ssl' job, given that the person working on
   that is no longer doing so, and no-one else has picked up
   the work.
2. 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.

Change-Id: I28ff7b95d3b2cc064c59c9966e9c25c7ad9184da
2018-09-16 03:38:08 +00:00
Markos Chandras 7a809e22a3 zuul: Drop distro jobs for Xenial and switch to smoke tests
There will be no Rocky packages for Xenial so there is little point
in testing Xenial against current and upcoming releases. As such,
lets switch to Bionic. This also makes the functional jobs in Bionic
voting again.

In addition, this change switches to use smoke tests only because
there is no upstream coverage to use the cinder_tempest_plugin which
seems to have some broken jobs.

It seems that we're currently configuring the LVM config after
the service is setup which can cause it to go up with missing
LVM configuration.

This moves the tasks up so that the underlying storage is prepared
before the service is installed and deployed.

This is a squashed commit that covers a few topics because dropping
the Xenial jobs fails because the cinder_tempest_plugin tests
are failing.  Also, the LVM config running later seems to cause
the process to spin, possibly causing some troubles for RabbitMQ
connectivity.

Depends-On: https://review.openstack.org/#/c/591966/
Depends-On: https://review.openstack.org/#/c/591968/
Change-Id: I592691358f8dc587182052f9a079886dfc442744
2018-08-16 10:03:20 -04:00
wangqi 4b6a52b88c Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I6d5909d69bc194359d51ce8059b96309443251e8
2018-08-06 07:21:04 +00:00
Zuul 52c2a52727 Merge "Fix usage of "|" for tests" 2018-07-26 11:11:36 +00:00
Jesse Pretorius 2fe8f7e09e Switch storage to use different inventory_hostname
Our role tests execute as non-root users, and the roles
need to access the environment variables for that non-root
user. Ansible, when targeting localhost, changes to
'connection: local' and thus breaks everything we need
to do against localhost as root unless we use 'become: true',
but we if generally use that against remote hosts we lose
the environment variables for the non-root user.

As such, we switch the inventory to target 'compute1' instead,
which has the address '10.1.1.1' (br-mgmt), so that we do not
have to deal with the implict connection type changes implemented
by Ansible.

Depends-On: https://review.openstack.org/584033
Change-Id: I738e4ca31cd4d465d7e7eee3de052a40f7b1596a
2018-07-19 19:13:17 +01:00
Jean-Philippe Evrard bf9a1c19fa 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: Ifec8022a02b0a5f259cadf5eb65ab74c51df3e73
2018-07-16 12:26:09 +02:00
Jesse Pretorius c5ecc77f46 Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. The 'shade' client library is not required any more now that we're
installing it via openstack_hosts. As there are no required packages left, the
task to install them is also removed.

We still need to implement the openrc file on the target host for the cinder
backends and qos tasks. Those use the cinder venv so we don't need packages
installed on the host for them - we do just need the openrc file. Once these
shell tasks can be replaced with os_* module tasks we can change the
implementation to use them and remove the openrc role execution.

Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: Iaf3084f597be0585cbd712bbdb9aa826c1f0c1eb
2018-07-13 13:42:58 +01:00
Zuul 612c860895 Merge "Revert cinder tempest plugin freeze" 2018-06-07 08:56:54 +00:00
Zuul 189aaaa022 Merge "Update to use oslo.messaging service for RPC and Notify" 2018-06-06 09:24:31 +00:00
Andrew Smith e8eae7d067 Update to use oslo.messaging service for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters
replace the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be
transparent to the cinder service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Update transport_url generation
* Add oslo.messaging to inventory
* Add release note

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: I6b29b89c80889eff34fe78674cd888ea9d398388
2018-06-04 13:39:05 -04:00
Jean-Philippe Evrard 5c0e8b8033 Revert cinder tempest plugin freeze
Now that the cinder tempest plugin has been fixed [1], we can
continue using the head of the master branch for testing
purposes.

[1]: https://review.openstack.org/#/c/572152/

Change-Id: Ib8eec3aeaf3de99292d46f2353053372470fc1bc
2018-06-04 17:34:12 +00:00
Jean-Philippe Evrard 350b7820b0 Temporarily freeze cinder plugins
Until we know what to do with cinder, let's use a previous
version of the tempest cinder plugins.

Change-Id: I835270808cc820936a353183820a8ceeee6cac1f
2018-06-04 11:21:31 +02:00
Jesse Pretorius 2dfef9c0a3 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: Iafee46b7293a82f0c9715603be76658a181898db
2018-03-28 10:13:26 +01:00
Zuul b1a2fd57a8 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:34:48 +00:00
Jesse Pretorius c35c95753b 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: I3f8b26b942be84fac20f26291c4fabfaf6d86f89
2018-03-25 16:19:15 +01:00
Jesse Pretorius cee52e1dbe 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: I4f320eea58d4add1b351c78c61300c621ab7f882
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:19:20 +00:00
Jesse Pretorius ccb94760b5 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: Ieecfb5d04e234672632b4f57252367745141c821
2018-03-13 16:49:27 +00:00
Major Hayden 4f090af7e2
Update upgrade script to use queens
Change-Id: I231334dc6f33f8ea2e4b7db24cb111c2a45a6fae
2018-02-14 15:35:05 -06:00
Jean-Philippe Evrard f1144a762c 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: Ied3168a4a2df385f8cba8f89b2efab208e639e55
Related-Bug: #1741471
2018-02-01 10:38:35 +00:00
Jean-Philippe Evrard 82fd8b6109 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: I0fb7872dbc2c295616c319cd7e373dd8e868b028
Depends-On: Ia78ea53a99923844f40fb4e9fe22ec0da4b0c335
2018-01-23 13:15:21 +00:00
Markos Chandras 6b739f21e3 tests: test-cinder-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: I6e6a232a213f0951f3d5fff8b4efac5898ce6d76
2017-12-18 10:41:10 +00:00
Jean-Philippe Evrard 3815c5bb4e 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.

On top of that, we needed to update the work for Zuul v3:
This implements the initial OSA zuul v3 role jobs.

This patch 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: I2d455e9a47c85b77655e3b55847cf45959901b77
2017-10-17 18:28:22 +00:00
Jesse Pretorius 12c9c008bf Update upgrade role for Pike
Change-Id: Ib3cb29d36f87eba28c1684caf1d7fb4d9b819947
2017-08-23 13:14:53 +01:00
Logan V 60e0628004 Include ceph_client role if needed
Moves the ceph_client role execution inside the os_cinder role
instead of executing it at the playbook level.

Change-Id: I620552d7de367d89a99d1622a4e0c89e78336e86
2017-07-13 09:12:16 -05:00
OpenStack Proposal Bot d569419d79 Updated from OpenStack Ansible Tests
Change-Id: Ie3cb360b1b630c06ce3dac6b61b4226766cd648a
2017-06-22 15:19:20 +00:00
Jesse Pretorius 1bbe80e83d Install lvm2 for cinder-volume LVM hosts
Currently the LVM2 package is installed by the
openstack_hosts role for the integrated build,
and by a test playbook for the role tests.

This does not seem sensible to me - it would
be better to ensure that the role installs the
distro packages it need in order to function
properly.

Additionally, it is not possible to setup a
loopback device inside an LXC container after
some recent updates to LXC. The secondary
cinder-volume service for LVM2 therefore
does not work, so it is removed from the
inventory to buy some time to come up with
an alternative solution.

Related-Bug: 1698831
Change-Id: Ie8a84a0412989c64fd896e8d781b8e9b2c153556
2017-06-19 14:23:12 +00:00
Nolan Brubaker d630fbc8ec Add availability benchmark test to Cinder upgrade
Change-Id: I8b82be5d50b6347228786e8e7bdaecdb552f65d1
Depends-On: Ie6a854edb276a0ee2e3066035a700af239924e57
2017-06-06 15:30:44 -04:00
Jesse Pretorius dd95023b8a 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: I0cd0a96c5a22837f854c350985fd9b6ede2ca9cc
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 17:41:58 +00:00
Jimmy McCrory 5c72bbb582 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: I50d04fc27d3ef2aa806a9d1e22c3149df8d87e67
2017-04-19 15:51:34 -07:00
Andy McCrae a88589b47a Fix Cinder upgrade jobs
The cinder upgrade job needs to run with the os_cinder-overrides.yml
overrides file otherwise the tempest tests that run will be too wide and
expect services that are not available (e.g. nova).

Change-Id: Ifadac49447edf2e0fd33fe04974386b2d6256935
2017-03-21 14:06:56 +00:00
Andy McCrae 70ededdf9b Fix "previous role" branch to stable/ocata
Change-Id: Ifa9fd45f37e91cad6e04905898eecc24a1f31ed9
2017-02-22 15:38:06 -05:00
Andy McCrae beba04141b Split out cinder upgrade into it's own script.
This will separate out the runs so that variables and modules are not
re-used across runs - ensuring the latest modules and versions are used,
and ensuring multiple versions of the tests playbook aren't required on
non-upgrade runs.

Change-Id: Ie1885ae20a87f27805d3e0c92adba16510c71b1c
2017-02-17 17:01:35 +00:00
Andy McCrae 27221f75a7 Split upgrade test into its own play
To avoid requiring all the os_previous_cinder 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: I861764c498618cf644c06b212cf789fe8aa6b3d4
2017-01-20 16:36:21 +00:00
Andy McCrae 879082f204 Ensure all cinder_backends are created
Combine all cinder_volume host's "cinder_backends" var to ensure all
cinder_backends are created, and there is no race condition setting up
the same backend for multiple hosts (e.g. rbd backends which exist on
multiple volume servers).

This adds a second cinder_volume node for testing, with a new backend,
as well as the old backend - this should ensure duplicate backends are
not created whilst backends are created for each cinder_volumes host.

Change-Id: I1c2fb1ef07423fc415622767ff09f058c773c1ed
Closes-Bug: 1649914
2017-01-04 11:43:33 +00:00
Jenkins 530ac66ba8 Merge "Cinder upgrade testing." 2016-11-30 15:39:50 +00:00
Andy McCrae 1c9bcb9b4e Cinder upgrade testing.
Implement upgrade testing for os_cinder role.

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

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: I674fe8cefac6f487c766d51f874f1b43468cdaaa
Implements: blueprint upgrade-testing
2016-11-22 11:04:27 +00:00
Donovan Francesco (drifterza) 31257e2d26 Using updated tempest method for cinder.
Change-Id: I5bd69f258d5cba1b577ee6b04780c2282fa4911a
2016-11-22 09:59:09 +02:00
Jesse Pretorius d1559a43ea Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

The unused and empty tests/cinder-overrides.yml is
removed.

Change-Id: Ibb811774e5b2b87d2bb41b4c2290c3d8ef4d81e6
2016-10-05 17:57:10 +01:00
Andy McCrae 660c5b8bae Standardize the testing for Cinder
This PR standardizes the testing around the central tests repository:

* Removes the install-cinder and prepare-vg playbooks
* Moves the inventory settings into host_vars
* Adjusts the "bridges" settings
* Standardize IP addresses on the 10.1.1.0/24 range

Change-Id: I91c8079b033bb83e0175a3ab4b1c020a8df4a0db
Depends-On: Ibe2bcd91af9eac099e86e92f9294ed04fffe7b95
2016-10-05 09:01:16 +00:00
Jean-Philippe Evrard 81e11817b2 Remove duplicate delegate_to
This will remove some warnings in the playbook runs.

Change-Id: I55ab98e0e30b8a3c2ade7a301d94535ae463c026
2016-10-03 12:11:26 +00:00
Jesse Pretorius 1ba9c98afe Fix git source in ansible-role-requirements
For any openstack git sources, git.openstack.org must be used.

Change-Id: Ie55ed136ea450a6364d6ba39154386ca8c41312a
2016-09-30 14:40:55 +01:00
Major Hayden 2653926436 Ansible 2.1.1 update
Co-Authored-By: Major Hayden <major@mhtx.net>
Change-Id: Ic59abac5d7f15da37748d5b9121b74cd8e75d3c3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-27 15:00:22 +00:00
Marc Gariepy f420900880 Add centos support for os_cinder role
Add basic centos support for cinder role

Change-Id: I21f84809c44ac4be0165fadfb8da67bbcbc9b05c
2016-09-23 13:48:06 +00:00
d34dh0r53 24da899834 Define cinder_default_volume_type for gating.
According to upstream bug[0] a volume_type must be specified when
creating a volume.  Since tempest does not provide a volume_type this
patch defines default_volume_type and sets it to lvm.

[0]: https://bugs.launchpad.net/cinder/+bug/1610073

Change-Id: I801cc3d3b846e0be3b777a57753e01406d3273d2
Closes-Bug: #1611937
2016-08-10 16:00:56 -05:00