Configure coordination in default for masakari-api

This patch introduces distributed lock for masakari-api
service when handle the concurrent notifications for the same
host failure from multiple masakari-hostmonitor services.

Change-Id: I46985202dc8da22601357eefe2727599e7a413e5
This commit is contained in:
Michal Arbet 2023-02-22 09:41:40 +01:00
parent c0a45c7eb7
commit 842adf6d2f
3 changed files with 16 additions and 0 deletions

View File

@ -403,6 +403,7 @@ mariadb_shard_backup_user_prefix: "backup_shard_"
mariadb_shards_info: "{{ groups['mariadb'] | database_shards_info() }}"
masakari_api_port: "15868"
masakari_coordination_backend: "{{ 'redis' if enable_redis | bool else 'etcd' if enable_etcd | bool else '' }}"
memcached_port: "11211"

View File

@ -70,3 +70,12 @@ policy_file = {{ masakari_policy_file }}
[taskflow]
connection = mysql+pymysql://{{ masakari_database_user }}:{{ masakari_database_password }}@{{ masakari_database_address }}/{{ masakari_database_name }}
{% if service_name == 'masakari-api' %}
[coordination]
{% if masakari_coordination_backend == 'redis' %}
backend_url = {{ redis_connection_string }}
{% elif masakari_coordination_backend == 'etcd' %}
backend_url = etcd3+{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ etcd_client_port }}{% if openstack_cacert %}?ca_cert={{ openstack_cacert }}{% endif %}
{% endif %}
{% endif %}

View File

@ -0,0 +1,6 @@
---
features:
- |
Masakari coordination backend can now be configured via
masakari_coordination_backend variable.
Coordination is optional and can now be set to either redis or etcd.