
MariaDB 11.4 does not include mysql* commands, so let's switch to mariadb* equivalents, especially that mysql* ones are deprecated. Change-Id: I6a3ac49f20d0a74198adc868c2a2260f7a6d5cfc
17 lines
667 B
YAML
17 lines
667 B
YAML
---
|
|
# Explicitly wait for the database to be accessible via the load balancer.
|
|
# Sometimes it can reject connections even when all database services are up,
|
|
# due to the health check polling in HAProxy.
|
|
- name: Wait for MariaDB service to be ready through VIP
|
|
become: true
|
|
command: >
|
|
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
|
|
mariadb -h {{ database_address }} -P {{ database_port }}
|
|
-u {{ mariadb_shard_database_user }} -p{{ database_password }} -e 'show databases;'
|
|
register: result
|
|
until: result is success
|
|
changed_when: False
|
|
retries: 6
|
|
delay: 10
|
|
when: mariadb_shard_id == mariadb_default_database_shard_id
|