mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-27 04:41:28 -07:00
Ensure replicas are healthy before rebooting them
This commit is contained in:
parent
3c621ea28c
commit
b6160f3a8c
1 changed files with 3 additions and 1 deletions
4
Makefile
4
Makefile
|
@ -36,10 +36,12 @@ test-integration:
|
|||
podman exec primary bash -c 'echo -e [mysqld]\\nserver-id=1\\nlog-bin=/var/lib/mysql/primary-bin > /etc/mysql/conf.d/replication.cnf'
|
||||
podman exec replica1 bash -c 'echo -e [mysqld]\\nserver-id=2\\nlog-bin=/var/lib/mysql/replica1-bin > /etc/mysql/conf.d/replication.cnf'
|
||||
podman exec replica2 bash -c 'echo -e [mysqld]\\nserver-id=3\\nlog-bin=/var/lib/mysql/replica2-bin > /etc/mysql/conf.d/replication.cnf'
|
||||
# Don't restart a container unless it is healthy
|
||||
# Don't restart a container unless it is healthy
|
||||
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
podman restart primary
|
||||
while ! podman healthcheck run replica1 && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
podman restart replica1
|
||||
while ! podman healthcheck run replica2 && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
podman restart replica2
|
||||
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
-set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker --docker-network podman --python $(python); set +x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue