Browse Source

Update conditions for mysql settings in minion.conf

There was a wrong assumption that if galera.master or
galera.slave or mysql.server was defined in pillar we tried
to pick user/password from pillar.
This patch updates condition to ensure that enabled attribute
set to True.

Related-Prod: PROD-16658

Change-Id: I9cdd9259000d7fc648b41d7402dc8ffe9659955b
pull/70/merge
Vasyl Saienko 7 years ago
parent
commit
df7b5f0f32
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      salt/files/minion.conf

+ 3
- 3
salt/files/minion.conf View File

{%- endif %} {%- endif %}
{%- endif %} {%- endif %}


{%- if pillar.get('galera', {}).master is defined %}
{%- if pillar.get('galera', {}).get('master', {}).get('enabled', False) %}


{%- from "galera/map.jinja" import master with context %} {%- from "galera/map.jinja" import master with context %}
mysql.unix_socket: {{ master.socket }} mysql.unix_socket: {{ master.socket }}
mysql.db: 'mysql' mysql.db: 'mysql'
mysql.charset: 'utf8' mysql.charset: 'utf8'


{%- elif pillar.get('galera', {}).slave is defined %}
{%- elif pillar.get('galera', {}).get('slave', {}).get('enabled', False) %}


{%- from "galera/map.jinja" import slave with context %} {%- from "galera/map.jinja" import slave with context %}
mysql.unix_socket: {{ slave.socket }} mysql.unix_socket: {{ slave.socket }}
mysql.db: 'mysql' mysql.db: 'mysql'
mysql.charset: 'utf8' mysql.charset: 'utf8'


{%- elif pillar.get('mysql', {}).server is defined %}
{%- elif pillar.get('mysql', {}).get('server', {}).get('enabled', False) %}


mysql.unix_socket: /var/run/mysqld/mysqld.sock mysql.unix_socket: /var/run/mysqld/mysqld.sock
{%- if pillar.mysql.server.admin is defined %} {%- if pillar.mysql.server.admin is defined %}

Loading…
Cancel
Save