Bladeren bron

Ensure permissions are correct for mysql dirs

When SSL enabled, /etc/mysq directory is created by salt.minion
state with 700 permissions. It prohibits mysql from reading config
file as normal mode is 755. This patch ensures that mode for
/etc/mysql and /etc/mysql/ssl have correct rights.

Change-Id: Icc2a43e7a56c60d30a716f29f0a9ec28c6549429
Related-Prod: ROD-16782
master
Vasyl Saienko 6 jaren geleden
bovenliggende
commit
d5d0984b80
3 gewijzigde bestanden met toevoegingen van 17 en 4 verwijderingen
  1. +13
    -0
      galera/_ssl.sls
  2. +2
    -2
      galera/master.sls
  3. +2
    -2
      galera/slave.sls

+ 13
- 0
galera/_ssl.sls Bestand weergeven

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


{%- if service.get('ssl', {}).get('enabled', False) %} {%- if service.get('ssl', {}).get('enabled', False) %}

galera_ssl_dir:
file.directory:
- name: /etc/mysql/ssl
- makedirs: true
- mode: 755
- require:
- pkg: galera_packages

{%- if service.ssl.cacert_chain is defined %} {%- if service.ssl.cacert_chain is defined %}
mysql_cacertificate: mysql_cacertificate:
file.managed: file.managed:
- create: False - create: False
- require: - require:
- file: mysql_cacertificate_exists - file: mysql_cacertificate_exists
- file: galera_ssl_dir
- require_in: - require_in:
- service: galera_service - service: galera_service
- file: galera_config - file: galera_config
- create: False - create: False
- require: - require:
- file: mysql_certificate_exists - file: mysql_certificate_exists
- file: galera_ssl_dir
- require_in: - require_in:
- service: galera_service - service: galera_service
- file: galera_config - file: galera_config
- makedirs: true - makedirs: true
- require: - require:
- pkg: galera_packages - pkg: galera_packages
- file: galera_ssl_dir
- require_in: - require_in:
- service: galera_service - service: galera_service
- file: galera_config - file: galera_config
- require: - require:
- file: mysql_server_key_exists - file: mysql_server_key_exists
- pkg: galera_packages - pkg: galera_packages
- file: galera_ssl_dir
- require_in: - require_in:
- service: galera_service - service: galera_service
- file: galera_config - file: galera_config

+ 2
- 2
galera/master.sls Bestand weergeven

- refresh: true - refresh: true
- force_yes: True - force_yes: True


galera_log_dir:
galera_dirs:
file.directory: file.directory:
- name: /var/log/mysql
- names: ['/var/log/mysql', '/etc/mysql']
- makedirs: true - makedirs: true
- mode: 755 - mode: 755
- require: - require:

+ 2
- 2
galera/slave.sls Bestand weergeven

- refresh: true - refresh: true
- force_yes: True - force_yes: True


galera_log_dir:
galera_dirs:
file.directory: file.directory:
- name: /var/log/mysql
- names: ['/var/log/mysql', '/etc/mysql']
- makedirs: true - makedirs: true
- mode: 755 - mode: 755
- require: - require:

Laden…
Annuleren
Opslaan