Commit fbea3471 authored by Alain Takoudjou's avatar Alain Takoudjou

repman: fix problem while requesting slave with cluster bad cluster name

If cluster name is not found, use default cluster name
parent 2b959ba2
......@@ -18,7 +18,7 @@ md5sum = 55c7fd4dd6a39b31878889fbfb00f995
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum = 6fc82c4b645bceb97ba7b6f5b56d161b
md5sum = dc01433ffed82386a3feee0b34767bed
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
......
......@@ -110,6 +110,9 @@ output = ${directory:bin}/update-proxysql-config
'cluster_id': instance_dict.get('cluster_id', default_slave_cluster_id),
'require_ssl': True
} -%}
{% if not slave_dict['cluster_id'] in cluster_name_list -%}
{% do slave_dict.__setitem__('cluster_id', default_slave_cluster_id) -%}
{% endif -%}
{% do slave_information_list.append(slave_dict) -%}
{% do database_slave_dict[slave_dict['cluster_id']].append(slave_dict) -%}
{% do db_name_dict[slave_dict['cluster_id']].append([slave_dict['name'], slave_dict['user']]) -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment