f6c0474afe
Prior to this change, if you generated the config before deploying any of the OVN services, it would fail on these tasks as the services will not have been started. TrivialFix Change-Id: Ia85ef26015ff341bff1414da039bed52f34e7cc0
89 lines
2.5 KiB
YAML
89 lines
2.5 KiB
YAML
---
|
|
- name: Restart ovn-nb-db container
|
|
vars:
|
|
service_name: "ovn-nb-db"
|
|
service: "{{ ovn_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart ovn-sb-db container
|
|
vars:
|
|
service_name: "ovn-sb-db"
|
|
service: "{{ ovn_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Wait for ovn-nb-db
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ ovn_nb_db_port }}"
|
|
connect_timeout: 1
|
|
timeout: 60
|
|
register: check_ovn_nb_db_port
|
|
until: check_ovn_nb_db_port is success
|
|
retries: 10
|
|
delay: 6
|
|
listen: "Restart ovn-nb-db container"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Wait for ovn-sb-db
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ ovn_sb_db_port }}"
|
|
connect_timeout: 1
|
|
timeout: 60
|
|
register: check_ovn_sb_db_port
|
|
until: check_ovn_sb_db_port is success
|
|
retries: 10
|
|
delay: 6
|
|
listen: "Restart ovn-sb-db container"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart ovn-northd container
|
|
vars:
|
|
service_name: "ovn-northd"
|
|
service: "{{ ovn_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart ovn-controller container
|
|
vars:
|
|
service_name: "ovn-controller"
|
|
service: "{{ ovn_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|