There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.
Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.
In this patch we remove the test-vars which were duplicated from the
role, and remove the MQ setup tasks as they are no longer required.
Change-Id: Ib515630c8fbf793258b40f15a4c9f2c18c4c7531
Trying to dynamically switch connection types and become
just doesn't work, so instead we force all role tests to
setup a different inventory_hostname for the services on
localhost so that Ansible connects to it in a different
way and we don't have to try and fudge it.
Change-Id: Ibbbab05efb0170bd66bf829a5d6c2ce136cb120f
Typically nova_compute is on localhost, so in
https://review.openstack.org/582957 we made the
change to set connection/become accordingly, but
as it turns out ironic does not deploy compute
on to localhost so that patch broke the ironic
tests.
So, given this is much the same requirement as
cinder's, we implement the same hack as done in
https://review.openstack.org/582579
Change-Id: Icf50423576cd95a891da743f2b8b7c01e81ceb38
The nova_compute group contains localhost, but due to
the name being different, it was missed in [1].
When targeting localhost with 'remote_user: root' and
using 'become: yes' we lose the environment variables
for the user running the playbook (eg: USER, HOME).
However, if we use 'connection: local' and 'become: yes'
together, it works properly. We apply this change to
ensure this play also has the correct access to change
things on the host.
[1] https://review.openstack.org/582359
Change-Id: Ia87e02c3b965be6f384d2f64911f0af2e4c2d598
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
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.
Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.
In this patch we remove the test-vars which were duplicated from the
role, and remove the DB setup tasks as they are no longer required.
Change-Id: Ie74023c542858f1017509689a3dc3b402614f3d4
Depends-On: https://review.openstack.org/571785
With the merge of https://review.openstack.org/569061 the
roles which do not have the rabbitmq_all group are failing
with messages like:
'dict object' has no attribute 'rabbitmq_all'
This patch ensures that the tasks are only activated if the
inventory group is present and populated.
Change-Id: I8f9004147753bb7f8121e344379417a6d6e2e807
With the merge of https://review.openstack.org/559127 the roles
which do not yet have the oslomsg_rpc_all/oslomsg_notify_all
groups are failing with messages like:
'dict object' has no attribute 'oslomsg_rpc_all'
'dict object' has no attribute 'oslomsg_notify_all'
This patch puts the old ensure-rabbitmq.yml task include back
and activates it when these groups are not defined.
Change-Id: I90dcd122fbc96f7737363dd353b50a516122667a
This commit contains updates to introduced oslo.messaging
service in place of rabbitmq server.
This patch:
* Add ensure oslo.messaging vhost and user for backend
* Update service role installs
* Add oslo.messaging settings to test-vars
Change-Id: Ie69d522ee2df4282ce4fc69c2b3f81f4df1da77d
The placement_database config options were added in Newton
but the actual code to use the options was reverted and is
not used.
Change-Id: Idd2edec3e98dbcd3361cf38434027ad16066ac46
Depends-On: https://review.openstack.org/541685
Related-Reviews: I31293ac4689630e4113588ab2c6373cf572b8f38
Closes-Bug: #1670419
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
This updates the test playbook to:
1. More efficiently execute the dependent package
installation, while being flexible enough to
cater for more package managers.
2. Splits the implementation of the nova
control plane services from the compute service
to allow the role to operate in a
semi-serialised manner.
3. Adds the package list for openSUSE
Change-Id: I1ebda750eeab9c6344f39c7132b2c82622c6e0be
The swift role includes tasks that delegate to the physical host of
containers (localhost in gate tests). Since ansible_become was removed
from localhost's vars, set become in this play to fix tests that install
swift.
Also add the become option to all other plays to avoid this issue for
any other roles that may now or in the future delegate tasks to localhost.
Change-Id: I08cada62636a1a7a1e2c1b15e0052876437e24aa
This patch adds the cell_v2 nova_cell0 database as part of the
test-install-nova.yml playbook. The var is required in test-vars for
this reason.
Additionally, we need to add permissions for the nova_api database user
to access the nova_cell0 database. This means we need to append
permissions for that user using the create-grant-db play. This defaults
to "omit" so is only used when "db_append_privs" is passed to the
include.
A work around is required for a bug in upstream nova - this should be
removed once https://review.openstack.org/#/c/428120/ merges.
Finally a fix was added to ensure the api_database is setup using the
appropriate address (although in this case it has no impact).
Change-Id: I082f37bb3ce61a900e06a58f21c7882f83671355
Neither the rabbit, nor galera common tasks use
the hostname var that was defined, so we can remove
the var from all test playbooks.
Change-Id: I92c85c2c5c53f4e3d028debcfe925c26ad84284b
Moved Rabbitmq and DB tasks to generic files.
This patch removes the redundant behaviour of the tasks such
as Ensuring Rabbitmq hosts and user, creating db, granting access
to db in the testing yml files. The patch makes it more generic
and shifted the common tasks to separate files create-grant-db.yml
and ensure-rabbitmq.yml
Change-Id: Ibd94e1ebdce45b782ab447ca3db5068588a1e368