Correct libvirt template patch
[armband.git] / patches / fuel-library / 0013-Allow-configuring-MySQL-WSREP-SST-provider.patch
1 From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
2 Date: Wed, 20 Apr 2016 14:54:42 -0700
3 Subject: [PATCH] Allow configuring MySQL WSREP SST provider
4
5 On some arm64 platforms xtrabackup is broken due to an outdated
6 MySQL/InnoDB code that it uses which is missing. To work around that
7 this patch allows choosing which WSREP SST provider to use. Aside of
8 already supported `xtrabackup-v2` and `mysqldump`, the `rsync` method
9 has been added as it is comparable to xtrabackup in terms of speed (or
10 is faster), has been validated to work on arm64 platforms where
11 xtrabackup is broken and it doesn't rely on db mechanisms to perform the
12 state transfer.
13
14 This patch is tied to a patch in fuel-web that introduces configuration
15 options for WSREP SST provider and in case nothing is specified, it
16 will choose `xtrabackup-v2`.
17
18 Signed-off-by: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
19 ---
20  deployment/puppet/osnailyfacter/manifests/database/database.pp | 6 ++++--
21  1 file changed, 4 insertions(+), 2 deletions(-)
22
23 diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp
24 index 1755c34..0cfbc8c 100644
25 --- a/deployment/puppet/osnailyfacter/manifests/database/database.pp
26 +++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp
27 @@ -8,6 +8,7 @@ class osnailyfacter::database::database {
28    $use_syslog               = hiera('use_syslog', true)
29    $primary_controller       = hiera('primary_controller')
30    $mysql_hash               = hiera_hash('mysql', {})
31 +  $wsrep_hash               = hiera_hash('mysql_wsrep', {})
32    $debug                    = pick($mysql_hash['debug'], hiera('debug', false))
33    $management_vip           = hiera('management_vip')
34    $database_vip             = hiera('database_vip', $management_vip)
35 @@ -22,6 +23,7 @@ class osnailyfacter::database::database {
36  
37    $mysql_root_password       = $mysql_hash['root_password']
38    $enabled                   = pick($mysql_hash['enabled'], true)
39 +  $wsrep_sst_method          = pick($wsrep_hash['wsrep_method'], 'xtrabackup-v2')
40  
41    $galera_node_address       = get_network_role_property('mgmt/database', 'ipaddr')
42    $galera_nodes              = values(get_node_to_ipaddr_map_by_network_role(hiera_hash('database_nodes'), 'mgmt/database'))
43 @@ -216,7 +218,7 @@ class osnailyfacter::database::database {
44          'wsrep_cluster_name'             => $galera_cluster_name,
45          'wsrep_provider_options'         => $wsrep_provider_options,
46          'wsrep_slave_threads'            => $wsrep_slave_threads,
47 -        'wsrep_sst_method'               => 'xtrabackup-v2',
48 +        'wsrep_sst_method'               => $wsrep_sst_method,
49          #TODO (sgolovatiuk): fix this, should be a specific user not root
50          'wsrep_sst_auth'                 => "\"root:${mysql_root_password}\"",
51          'wsrep_node_address'             => $galera_node_address,
52 @@ -269,7 +271,7 @@ class osnailyfacter::database::database {
53        wsrep_group_comm_port => $wsrep_group_comm_port,
54        bind_address          => $galera_node_address,
55        local_ip              => $galera_node_address,
56 -      wsrep_sst_method      => 'xtrabackup-v2',
57 +      wsrep_sst_method      => $wsrep_sst_method,
58        override_options      => $override_options,
59      }
60