Workaround bug in RHEL installation of percona
diff --git a/galera/map.jinja b/galera/map.jinja
index f67a49e..2e22de6 100644
--- a/galera/map.jinja
+++ b/galera/map.jinja
@@ -9,7 +9,7 @@
     'config': '/etc/mysql/my.cnf',
   },
   'RedHat': {
-    'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup-22'],
+    'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
     'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
     'service': 'mariadb',
     'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
@@ -29,7 +29,7 @@
     'config': '/etc/mysql/my.cnf',
   },
   'RedHat': {
-    'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup-22'],
+    'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
     'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
     'service': 'mariadb',
     'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
diff --git a/galera/master.sls b/galera/master.sls
index c914fe2..eb355c3 100644
--- a/galera/master.sls
+++ b/galera/master.sls
@@ -8,6 +8,16 @@
     - percona-release: {{ master.xtrabackup_repo }}
   - require_in:
     - pkg: galera_packages
+
+# Workaround https://bugs.launchpad.net/percona-server/+bug/1490144
+xtrabackup_repo_fix:
+  cmd.run:
+    - name: 'sed -i \'s,enabled\ =\ 1,enabled\ =\ 1\nexclude\ =\ Percona-XtraDB-\*\ Percona-Server-\*,g\' /etc/yum.repos.d/percona-release.repo'
+    - unless: 'grep "exclude = Percona-XtraDB-\*" /etc/yum.repos.d/percona-release.repo'
+    - watch:
+      - pkg: xtrabackup_repo
+    - require_in:
+      - pkg: galera_packages
 {%- endif %}
 
 galera_packages:
diff --git a/galera/slave.sls b/galera/slave.sls
index 6c91454..cdba5b7 100644
--- a/galera/slave.sls
+++ b/galera/slave.sls
@@ -8,6 +8,16 @@
     - percona-release: {{ slave.xtrabackup_repo }}
   - require_in:
     - pkg: galera_packages
+
+# Workaround https://bugs.launchpad.net/percona-server/+bug/1490144
+xtrabackup_repo_fix:
+  cmd.run:
+    - name: 'sed -i \'s,enabled\ =\ 1,enabled\ =\ 1\nexclude\ =\ Percona-XtraDB-\*\ Percona-Server-\*,g\' /etc/yum.repos.d/percona-release.repo'
+    - unless: 'grep "exclude = Percona-XtraDB-\*" /etc/yum.repos.d/percona-release.repo'
+    - watch:
+      - pkg: xtrabackup_repo
+    - require_in:
+      - pkg: galera_packages
 {%- endif %}
 
 galera_packages: