Execute cinder_backends on the last API server

Currently the backend setup executes on the first cinder-api
host. The playbook to execute the setup of the API is done
in serial. This creates a bit of a problem on a greenfield
deployment which uses haproxy because the backend is disabled
and there are no other API hosts setup yet. This makes the
CLI commands which require the API to be working fail.

This patch makes the backend create task set execute on the
last cinder-api host. This means that when they execute, there
should already be other API services up and therefore the load
balancer will be able to handle the API requests.

Closes-Bug: #1753125
Change-Id: I335b9f4ef0566d1561275059b90e0a50d16c4992
This commit is contained in:
Jesse Pretorius 2018-03-24 15:10:23 +00:00
parent 9cbff60731
commit 76e0e8cfa0
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@
when:
- "groups[cinder_services['cinder-volume']['group']] | length > 0"
- "cinder_services['cinder-api']['group'] in group_names"
- "inventory_hostname == ((groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | list)[0]"
- "inventory_hostname == ((groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | list)[-1]"
tags:
- cinder-config