Commit Graph

17 Commits

Author SHA1 Message Date
ZhijunWei a427089ea8 use import_playbook 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: I87fa723334745680efd87743ac936815df664c4d
Closes-Bug: #1792761
2018-09-27 01:54:41 +00:00
Kevin Carter 477d44cab9
Update glance NFS for systemd
Systemd has the ability to manage mounts and ensure functionality
/ resource management. Using a systemd mount has the benifit of not
requiring writes to the legacy fstab file which can impact OS
functionality especially when deploying on baremetal. This change
moves the glance NFS mount to a systemd unit file allowing systemd
to manage it independently with no potentially breaking impact to
the underlying operating system.

Changes:
 - This PR corrects a long standing issue when using Glance+NFS where
   initial deployment would work but if the playbooks were run again
   it would fail due to the glance images location being an NFS mount
   point with a potentially different UID/GID. To correct this we stat
   the directory and if it does NOT exist it is created.
 - Following the nova pattern options have been provided to set the UID
   and GID of the glance user.
 - To ensure out NFS backend solution works with the installation of
   glance a test has been added to deploy glance using an NFS backend.
 - An upgrade task has been added to this commit to clean up legacy
   mounts, This task should be removed in R.

Change-Id: I716c9fe35391629532e67e212d45ea27a5422d1b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-12-12 17:49:55 -06:00
Jesse Pretorius 6534ebe2e0 Implement testing using tempest
Rather than the previous basic functional tests, this
implements the use of tempest to exercise the API's
properly to validate that they're working properly.

Included is the normalisation of the way the upgrade
test is implemented to make it exactly in line with
the way the original API upgrade test was implemented
in the keystone repository. This keeps it consistent.

Change-Id: Id491d018beb30bce748240b50e9d66dcc1a249fa
2017-11-20 12:49:10 +00:00
Andy McCrae 8f8b239b3c Split upgrade test into its own play
To avoid requiring all the os_previous_glance 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: Iae43ff48a6656e9fff0952d6d388e6699461b336
2017-01-20 16:39:07 +00:00
Andy McCrae 6bd22d2528 Glance upgrade testing.
Implement upgrade testing for os_glance role.

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

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: I8b2418ffc9197814b0eb85da647916323f9cefd5
Implements: blueprint upgrade-testing
2016-11-22 11:06:30 +00:00
Jesse Pretorius ded6813ac1 Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: Ie2938a023310885a91907707880ed53f139536cf
2016-09-27 18:46:26 +01:00
Travis Truman 30aa5c1cf0 Ansible 2.1.1 role testing
Change-Id: Iea1f725c585ca5bfe3dcdba1a8cac95a5e8e211c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:16:44 -04:00
Jesse Pretorius 66e8dc3b6e Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I29e93c889f1450c33529563687a74914d8b03006
2016-08-30 17:04:39 +01:00
Travis Truman 83586cb66d Functional test uploading an image
We should ensure that an image can be uploaded to
Glance before considering the role fully functional.

Change-Id: Iff2c84ef29de698d67010e7acb23f8f90d4b8eaf
Closes-Bug: #1553960
2016-03-18 11:01:17 -04:00
Jenkins fb042fa021 Merge "Tests: Make containers use the host's apt/pip config" 2016-03-17 20:28:00 +00:00
Travis Truman 5d4c6c99d5 Remove dependency on the Keystone admin auth token
Now that auth token usage is deprecated, prefer the admin
user and password for all glance setup tasks run against
keystone.

Change-Id: I4254f5d9b32be00d4bbb15b7107abfed6032c764
2016-03-17 10:47:20 -04:00
Jesse Pretorius f6aa022cd4 Tests: Make containers use the host's apt/pip config
This patch sets the test to check if the test is running in
OpenStack-CI, and if it is - then make the containers use
the host's pip.conf and some of the apt configuration.

All containers should make use of the hosts's apt sources
configuration. The tasks detect and implement this.

The intent is to make use of OpenStack-CI resources better
and consequently reduce the test run time.

Change-Id: Ide404ff0a9dcb78b884cd8b2de83792c5abec3e7
2016-03-17 13:24:53 +00:00
Travis Truman 8a4fed2ccf Functional testing for Glance API and registry
Adding a barebones functional test to ensure that
both services have started and are responding to basic
API requests.

Change-Id: I965d6701a66f9fa6dec9f5b6eb58d7778446418e
2016-03-16 06:55:39 +00:00
Matt Thompson fda42ebd9a Use upper-constraints file in developer mode
Last week, keystone was failing to install in developer mode due to us
not specifying upper constraints.  This was due to an upcapped version
of pysaml2 being installed which is causing problems.  This commit first
clones the requirements repo and then uses the upper constraints file
when installing packages.

Note that we only update pip_install_options when in developer mode if
the constraints aren't already set.  This is because in developer mode
you could have a container with multiple services running on it and the
pip_install_options fact would get updated when already set, resulting
in pip failing to install packages.

Change-Id: I270d7a37541d497ee0e1a576d5fda6f38dd2cb4c
Partial-Bug: #1553960
2016-03-14 15:14:16 +00:00
Andy McCrae 404b9e2a8b Prevent IP conflicts on lxcbr0
We assign IPs to the containers from the dhcp range handled by lxc. This
could cause random failures due to IP conflicts on this range.

Adjusting the dhcp range for lxc and adjusting the assigned IPs for
containers to fall outside of that range resolves this.

Change-Id: I88af22c73543e4d96d2dbe5fc440e5d11738d927
2016-03-11 15:27:37 +00:00
Matt Thompson 0e4f35c144 Enable functional convergence testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and glance for a functional convergence test.  Note that we
point at a non-existent memcached server, but this can be adjusted to
build memcached if deemed necessary.

Change-Id: I389d23561313882a0c3fb6236159fee71ab54c3f
2016-03-08 16:20:01 +00:00
Matt Thompson 7ee4373ba6 Implement base configuration for independent repository
This is a first pass at bringing in the necessary bits for the gate to
successfully pass.

Change-Id: I5b4a6c813eaea5f4a4fea4b0a8b4905c4054382d
2016-03-02 07:28:55 +00:00