Commit Graph

10 Commits

Author SHA1 Message Date
Jonathan Rosser cef65a6390 Update ansible-lint==4.3.5, flake8==3.8.3, bashate>=0.5.1
Correct lint errors that arise from these version updates.

Change-Id: I3216032b0d383ca6d4f6304c92151ce12dc5e114
2020-09-30 11:24:29 +00:00
Marc Gariepy 03f9f1fdc5 Use 'become' for destroy container playbook.
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: I999aa55269348497154a8eb073c2ff663242af4e
2018-07-12 10:20:33 -04: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
Kevin Carter 54930c0048
Remove the serialization in tests
The lxc container create process were running in serial as it sets up
the test environment. Being this is setting up a test environment
there's no need for it to be executed in serial. The original reason
these container creates were running in serial was due to SSH issues
however the integrated repo has been creating containers in parallel for
sometime now so it is believed the original control path issues have
been resolved.

Change-Id: I59d563549b288e634338474aed45011e94b85c47
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-12-12 17:52:01 -06: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 fa4937e52e Remove connection: local usage
In Ansible 2.3 the local connection plugin overrides
the host vars for the ansible_python_interpreter,
causing tests to use the wrong interpreter and
install python packages into unexpected locations.
This is especially visible when using host
delegation to localhost instead of the targeting
localhost directly.

To ensure that the behaviour remains consistent with
our expectations all local connection usage for
localhost is removed and localhost is targeted as
a remote host.

Change-Id: Ifcccf3c25aa10085b35017b01644354e10eca15a
2017-05-02 15:39:36 +01:00
Kevin Carter 75ad9983f4
Fix container destroy/create
The container destroy playbook was attempting to ssh to the targets
it was destroying instead of simply connecting to the localhost and
removing them. This change allows the connection to be local allowing
the destroy to go through.

This also changes the container create and destroy tasks to be done
in serial. This is being done due to potential control path issues.

Change-Id: Ide0fa39bfef917abd8b0abf1b5c9991beae9c10b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-16 12:47:42 -05:00
Travis Truman 07ff52a218 Fix container destroy host group
Containers were not being destroyed previously
as the host group in the destroy_containers play
had a typo and did not match any hosts

Change-Id: I7107034acb4a71dae2cb5d8d5738b11fdd359782
2016-09-15 00:24:02 +01:00
Kevin Carter f136720898 Remove pinned vars and set become:true
This patch removes the following pinned vars for test execution:

lxc_container_release:
This variable is set based on the host platform and should not
be fixed to this value in the playbook.

lxc_container_backing_store:
This value is dynamically set based on the host configuration
and 'dir' is the fallback value so it does not need to be set.

global_environment_variables:
This value is an *optional* variable. It was only ever set in
order to test that the functionality to apply the contents of
this variable work.

This patch also sets 'become: true' for the playbook to ensure
that the execution of the container creation/deletion is executed
as the root user.

Change-Id: Id6f35e1b9fef5096c06dffb1900c2d144bc5ece4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-12 18:19:27 +01:00
Shashank Tavildar d7a3cad5e9 Separated operations of creating and destroying test containers from test-prepare-container.yml
test-prepare-container.yml is seperated into:
test-prepare-container.yml: Creation of test containers.
destroy-containers.yml: Deletion of test container.

Change-Id: I2e42debeaca0a3a8c837fd34c11ad7e6cbcf151b
2016-08-17 19:11:26 +00:00