Add check for the situation when variable galera_mysql_version
set to 3.6 version and UPDATE_TO_MYSQL57 flag is set
PROD-36779
Change-Id: I9f6403abe9eca16c5b3b9b4f2085fb51cfbf7d80
(cherry picked from commit 1f5865fadb1539363db7f8a35f7a4b99cf93f46a)
diff --git a/openstack-galera-upgrade.groovy b/openstack-galera-upgrade.groovy
index a8e085d..348de49 100644
--- a/openstack-galera-upgrade.groovy
+++ b/openstack-galera-upgrade.groovy
@@ -133,6 +133,11 @@
If you want to update from 5.6 version to 5.7 set flag UPDATE_TO_MYSQL57 in the current job.
If you don't want to update from 5.6 version to 5.7 you need to change the value for galera_mysql_version to 5.6 in your model.""")
}
+ if (mysqlPillarVersion == '5.6' && updateToMysql57 == true) {
+ error("""Pre upgrade check failed. You are trying to update MySQL package from version 5.6 to version 5.7 the wrong way.
+ If you want to update from 5.6 version to 5.7 you need to set galera_mysql_version variable in your model to 5.7 value.
+ If you don't want to update from 5.6 version to 5.7 you need to unset flag UPDATE_TO_MYSQL57""")
+ }
salt.enforceState(env, target, ['linux.system.repo'])
common.stageWrapper(upgradeStageMap, "Pre upgrade", target, interactive) {