Skip to content
Snippets Groups Projects
Commit 789f50b2 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Fix mistral service"

parents 60e13ec1 a71874f2
No related branches found
No related tags found
No related merge requests found
......@@ -552,6 +552,22 @@ listen congress_api_external
{% endif %}
{% endif %}
{% if enable_mistral | bool %}
listen mistral_api
bind {{ kolla_internal_vip_address }}:{{ mistral_api_port }}
{% for host in groups['mistral-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mistral_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% if haproxy_enable_external_vip | bool %}
listen mistral_api_external
bind {{ kolla_external_vip_address }}:{{ mistral_api_port }} {{ tls_bind_info }}
{% for host in groups['mistral-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mistral_api_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
{% endif %}
# (NOTE): This defaults section deletes forwardfor as recomended by:
# https://marc.info/?l=haproxy&m=141684110710132&w=1
......
......@@ -28,9 +28,9 @@ mistral_api_image_full: "{{ mistral_api_image }}:{{ mistral_api_tag }}"
####################
# OpenStack
####################
mistral_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ mistral_api_port }}"
mistral_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ mistral_api_port }}"
mistral_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ mistral_api_port }}"
mistral_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ mistral_api_port }}/v2"
mistral_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ mistral_api_port }}/v2"
mistral_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ mistral_api_port }}/v2"
mistral_logging_debug: "{{ openstack_logging_debug }}"
......
......@@ -7,13 +7,14 @@ log_dir = /var/log/kolla/mistral
# stderr and collected by Docker
use_stderr = False
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if service_name == 'mistral-api' %}
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
bind_port = {{ mistral_api_port }}
[api]
host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
port = {{ mistral_api_port }}
{% endif %}
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[database]
connection = mysql+pymysql://{{ mistral_database_user }}:{{ mistral_database_password }}@{{ mistral_database_address }}/{{ mistral_database_name }}
max_retries = -1
......
......@@ -553,6 +553,22 @@
state: stopped
when: inventory_hostname in groups['haproxy']
- name: Checking free port for Mistral API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ mistral_api_port }}"
connect_timeout: 1
state: stopped
when: inventory_hostname in groups['mistral-api']
- name: Checking free port for Mistral API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ mistral_api_port }}"
connect_timeout: 1
state: stopped
when: inventory_hostname in groups['haproxy']
- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node
command: ping -c 3 {{ item }}
register: ping_output
......
......@@ -4,5 +4,6 @@
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head
mistral-db-manage --config-file /etc/mistral/mistral.conf populate
exit 0
fi
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