If galera not enabled check we need to install mysql
Galera is not always enabled in the cloud, this patch ensures
we install mysql:server and client if galera is not enabled.
Change-Id: I24cfeac584f5a41d612f57c3007335358bf229b0
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index e4be806..fa5e8d3 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -75,6 +75,12 @@
// Check galera status
salt.runSaltProcessStep(master, 'I@galera:master', 'mysql.status')
salt.runSaltProcessStep(master, 'I@galera:slave', 'mysql.status')
+ // If galera is not enabled check if we need to install mysql:server
+ } else if (salt.testTarget(master, 'I@mysql:server')){
+ salt.enforceState(master, 'I@mysql:server', 'mysql.server', true)
+ if (salt.testTarget(master, 'I@mysql:client')){
+ salt.enforceState(master, 'I@mysql:client', 'mysql.client', true)
+ }
}
// Install docker