Add a sleep after salt master update
The salt packages update procedure did not take into account that updating
takes time. After starting the asynchronous update it immediately checked
the status of minions and succeeded, but the real update happened later.
While here also fix the minor issue in the cloud deploy pipeline.
Closes-Bug: PROD-35424
Change-Id: I2ceeeac532059c783a55dd2459c9d22b39f05bdd
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 8009b05..f473d8e 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -549,8 +549,7 @@
// Workaround for PROD-17765 issue to prevent crashes of keystone.role_present state.
// More details: https://mirantis.jira.com/browse/PROD-17765
salt.restartSaltMinion(venvPepper, "I@keystone:client ${extra_tgt}")
- //
- salt.minionsReachable(venvPepper, 'I@salt:master', 'I@keystone:client ${extra_tgt}', null, 10, 6)
+ salt.minionsReachable(venvPepper, 'I@salt:master', "I@keystone:client ${extra_tgt}", null, 10, 6)
stage('Install OpenStack network') {
diff --git a/upgrade-mcp-release.groovy b/upgrade-mcp-release.groovy
index 01c288f..1072c97 100644
--- a/upgrade-mcp-release.groovy
+++ b/upgrade-mcp-release.groovy
@@ -63,6 +63,10 @@
salt.cmdRun(venvPepper, "I@salt:master", "salt -C '${target}' --async pkg.install force_yes=True pkgs='$pkgs'")
// can't use same function from pipeline lib, as at the moment of running upgrade pipeline Jenkins
// still using pipeline lib from current old mcp-version
+
+ // sleep to make sure package update started, otherwise checks will pass on still running old instance
+ sleep(120)
+
common.retry(20, 60) {
salt.minionsReachable(venvPepper, 'I@salt:master', '*')
def running = salt.runSaltProcessStep(venvPepper, target, 'saltutil.running', [], null, true, 5)