Add support of MySQL 5.7 update procedure

PROD-36779

Change-Id: Ib53f534fc9e6c4cd166ac1233341738a19b5fb98
(cherry picked from commit 6945afcdfdd1b24d231184a1f4c7737c8af8fd54)
diff --git a/galera/upgrade/update_master.sls b/galera/upgrade/update_master.sls
new file mode 100644
index 0000000..52d03e1
--- /dev/null
+++ b/galera/upgrade/update_master.sls
@@ -0,0 +1,23 @@
+{%- from "galera/map.jinja" import master with context %}
+
+{%- set galera = master %}
+
+galera_task_update_master:
+  test.show_notification:
+    - name: "dump_message_update_master"
+    - text: "Running galera.upgrade.update_master"
+
+gcomm_is_empty:
+  cmd.run:
+  - name: "sed -i '/gcomm/c\\wsrep_cluster_address=\"gcomm://\"' /etc/mysql/my.cnf"
+
+galera_packages:
+  pkg.latest:
+  - names: {{ galera.pkgs }}
+
+mysql_service_stopped:
+  service.dead:
+  - name: {{ galera.service }}
+  {%- if grains.get('noservices') %}
+  - onlyif: /bin/false
+  {%- endif %}
diff --git a/galera/upgrade/update_slave.sls b/galera/upgrade/update_slave.sls
new file mode 100644
index 0000000..aa57616
--- /dev/null
+++ b/galera/upgrade/update_slave.sls
@@ -0,0 +1,12 @@
+{%- from "galera/map.jinja" import slave with context %}
+
+{%- set galera = slave %}
+
+galera_task_update_slave:
+  test.show_notification:
+    - name: "dump_message_update_slave"
+    - text: "Running galera.upgrade.update_slave"
+
+galera_packages:
+  pkg.latest:
+  - names: {{ galera.pkgs }}