Skip to content
Snippets Groups Projects
Commit 1a82bd91 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fix restart policy after MariaDB recovery"

parents db228d1a f979ae1f
No related branches found
No related tags found
No related merge requests found
...@@ -186,15 +186,10 @@ ...@@ -186,15 +186,10 @@
kolla_docker: kolla_docker:
action: "start_container" action: "start_container"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
BOOTSTRAP_ARGS: " "
image: "{{ mariadb_service.image }}"
labels:
BOOTSTRAP:
name: "{{ mariadb_service.container_name }}" name: "{{ mariadb_service.container_name }}"
restart_policy: no image: "{{ mariadb_service.image }}"
volumes: "{{ mariadb_service.volumes }}" volumes: "{{ mariadb_service.volumes }}"
dimensions: "{{ mariadb_service.dimensions }}"
when: when:
- bootstrap_host is defined - bootstrap_host is defined
- bootstrap_host != inventory_hostname - bootstrap_host != inventory_hostname
...@@ -214,4 +209,32 @@ ...@@ -214,4 +209,32 @@
- bootstrap_host is defined - bootstrap_host is defined
- bootstrap_host != inventory_hostname - bootstrap_host != inventory_hostname
- name: Restart master MariaDB container
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ mariadb_service.container_name }}"
image: "{{ mariadb_service.image }}"
volumes: "{{ mariadb_service.volumes }}"
dimensions: "{{ mariadb_service.dimensions }}"
when:
- bootstrap_host is defined
- bootstrap_host == inventory_hostname
- name: Wait for master mariadb
wait_for:
host: "{{ api_interface_address }}"
port: "{{ mariadb_port }}"
connect_timeout: 1
timeout: 60
search_regex: "MariaDB"
register: check_mariadb_port
until: check_mariadb_port is success
retries: 10
delay: 6
when:
- bootstrap_host is defined
- bootstrap_host == inventory_hostname
- import_tasks: wait_for_loadbalancer.yml - import_tasks: wait_for_loadbalancer.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment