Add connection check before configuring tripleo-admin

This change adds a connection check to the "Run create admin" playbook
which will ensure the target host is up and ready to recieve connection
prior to attempting to execute the rest of the playbook. This is being
done because there is a chance servers may not be up and available by
the time this playbook is executed and we dont want to cause a bad
user experience by failing early, forcing the deployer to rerun a
deployment for no reason.

Closes-Bug: #1873246
Change-Id: I2d2e3bdcaf0a31d8daf90656533ac0f55b70fa26
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-04-16 07:49:46 -05:00 committed by Kevin Carter (cloudnull)
parent 1c73d3ac64
commit e50d06bbd0
1 changed files with 18 additions and 0 deletions

View File

@ -190,6 +190,24 @@
hosts: localhost:tripleo_queues
become: true
any_errors_fatal: true
gather_facts: false
pre_tasks:
# NOTE(cloudnull): The connection will allow for 40 minutes before failing. This time was chosen
# because a server may take anywhere from 5 to 40 minutes to boot, and in large
# deployments the number of "forks" may not accomodate all nodes running this
# task in parallel. Because we don't know the all of the characteristics of the
# machine being used, there's no way to compute the value appropriate for a
# given node(s), so 40 minutes should accommodate most environments.
- name: Wait for connection to become available
wait_for_connection:
sleep: 4
timeout: 2400
- name: Gather facts with an active connection
setup:
gather_subset:
- '!facter'
- '!ohai'
roles:
- role: tripleo_create_admin
tripleo_admin_user: tripleo-admin