upgrade fix input to restore db
Change-Id: I14bb23eeafc023ec27a2f2d116ee1a2ec5574822
diff --git a/openstack-control-upgrade.groovy b/openstack-control-upgrade.groovy
index f6b3f6a..528aba1 100644
--- a/openstack-control-upgrade.groovy
+++ b/openstack-control-upgrade.groovy
@@ -44,10 +44,8 @@
common.warningMsg("No response from some minions. We should continue to run")
}
- def _pillar = salt.getGrain(pepperEnv, 'I@salt:master', 'domain')
- def domain = _pillar['return'][0].values()[0].values()[0]
- print(_pillar)
- print(domain)
+ def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain')
+ domain = domain['return'][0].values()[0]
// read backupninja variable
_pillar = salt.getPillar(pepperEnv, 'I@backupninja:client', '_param:backupninja_backup_host')
@@ -209,10 +207,8 @@
stage('Real upgrade') {
// # actual upgrade
- _pillar = salt.getGrain(pepperEnv, 'I@salt:master', 'domain')
- domain = _pillar['return'][0].values()[0].values()[0]
- print(_pillar)
- print(domain)
+ def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain')
+ domain = domain['return'][0].values()[0]
_pillar = salt.getGrain(pepperEnv, 'I@salt:control', 'id')
kvm01 = _pillar['return'][0].values()[0].values()[0]
@@ -278,12 +274,12 @@
for (t in control_target_hosts) {
def target = t.split("\\.")[0]
// wait until ctl and prx nodes are registered in salt-key
- salt.minionPresent(pepperEnv, 'I@salt:master', '${target}')
+ salt.minionPresent(pepperEnv, 'I@salt:master', "${target}")
}
for (t in proxy_target_hosts) {
def target = t.split("\\.")[0]
// wait until ctl and prx nodes are registered in salt-key
- salt.minionPresent(pepperEnv, 'I@salt:master', '${target}')
+ salt.minionPresent(pepperEnv, 'I@salt:master', "${target}")
}
// salt '*' saltutil.refresh_pillar
@@ -360,6 +356,7 @@
} catch (Exception e) {
errorOccured = true
+ input message: "Some states that require syncdb failed. Please check the reason and click proceed only if you want to restore database into it's pre-upgrade state. Otherwise, click abort."
common.warningMsg('Some states that require syncdb failed. Restoring production databases')
// database restore section
@@ -481,10 +478,8 @@
input message: "Do you really want to continue with the rollback?"
}
- _pillar = salt.getGrain(pepperEnv, 'I@salt:master', 'domain')
- domain = _pillar['return'][0].values()[0].values()[0]
- print(_pillar)
- print(domain)
+ def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain')
+ domain = domain['return'][0].values()[0]
_pillar = salt.getGrain(pepperEnv, 'I@salt:control', 'id')
kvm01 = _pillar['return'][0].values()[0].values()[0]