Configure Galera parameters

Configure Galera parameters

This section provides an instruction on how to configure the parameters of the MySQL my.cnf configuration file by overriding them on the cluster level of the Reclass model.

Note

The capability to configure the tmp_table_size, max_heap_table_size, and table_open_cache parameters is available starting from the 2019.2.5 maintenance update. To enable the feature, follow the steps described in Apply maintenance updates.

To configure parameters of the MySQL configuration file:

  1. Open your project Git repository with the Reclass model on the cluster level.

  2. In cluster/<cluster_name>/openstack/database/init.yml, define the following parameters as required. The available values for <role> are master or slave.

    Warning

    The following list may be not exhaustive.

    Galera configurable parameters
    Section Galera parameter Pillar parameter key name
    [mysql] ssl-ca galera:<role>:ssl:ca_file [0]
      ssl-cert galera:<role>:ssl:cert_file [0]
      ssl-key galera:<role>:ssl:key_file [0]
    [mysqld] bind-address galera:<role>:bind:address
      max_connections galera:<role>:max_connections
      log_error galera:<role>:error_log_path [1]
      table_open_cache galera:<role>:table_open_cache
      tmp_table_size galera:<role>:tmp_table_size
      max_heap_table_size galera:<role>:max_heap_table_size
      innodb_buffer_pool_size galera:<role>:innodb_buffer_pool_size
      innodb_read_io_threads galera:<role>:innodb_read_io_threads
      innodb_write_io_threads galera:<role>:innodb_write_io_threads
      wsrep_provider galera:<role>:wsrep_provider
      wsrep_slave_threads galera:<role>:wsrep_slave_threads
      wsrep_sst_auth (galera:<role>:sst:user):(galera:<role>:sst:password) [2]
      wsrep_node_address galera:<role>:bind:address
    [xtrabackup] parallel galera:<role>:xtrabackup_parallel

    For example:

    parameters:
      galera:
        slave:
          bind:
            address: 127.0.0.1
    
[0](1, 2, 3) Requires galera:<role>:ssl:enabled == true.
[1]Requires galera:<role>:error_log_enabled == true.
[2]The parameter is concatenated from two pillar values.