Comment 0 for bug 1693234

Revision history for this message
Daniel Marks (d3n14l) wrote : Using galera_my_cnf_overrides removes includedir line

While troubleshooting a galera setup problem I used galera_my_cnf_overrides in my user_variables.

galera_my_cnf_overrides:
  sst:
    sst-initial-timeout: 600

Only to find that it made the problem even worse. After some further troubleshooting I realized that something removed a quiet important line from my my.cnf in the galer lxc container. The line that is missing is:

!includedir /etc/mysql/conf.d/

Which will include other configuration files including those used by wsrep. Bootstrapping a new galera cluster obviously will not work if this line is missing, I have no idea what that change would do to an existing cluster...

The corresponding task can be found in /etc/ansible/roles/galera_server/tasks/galera_post_install.yml

- name: Drop mariadb config(s)
  config_template:
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
    owner: "root"
    group: "root"
    mode: "0644"
    config_overrides: "{{ item.config_overrides }}"
    config_type: "{{ item.config_type }}"
  with_items:
    - src: my.cnf.j2
      dest: /etc/mysql/my.cnf
      config_overrides: "{{ galera_my_cnf_overrides }}"
      config_type: "ini"
    - src: cluster.cnf.j2
      dest: /etc/mysql/conf.d/cluster.cnf
      config_overrides: "{{ galera_cluster_cnf_overrides }}"
      config_type: "ini"
    - src: debian.cnf.j2
      dest: /etc/mysql/debian.cnf
      config_overrides: "{{ galera_debian_cnf_overrides }}"
      config_type: "ini"
  notify: Restart mysql
  tags:
    - galera-config
    - galera-client-user-config

For me it looks like the "!includedir " line is treated as an comment and gets removed by the config_template module.