Do not update repos after snapshot revert
In the cloud-update pipleine, a VM snapshot is taken at the very
beginning of the update process, before anything gets executed on
the nodes. Therefore, when a snapshot is reverted, there is no need
to run any states after that - the node is already in the original state.
Change-Id: I68266c170755c788b80976d80433937aa80dc2d6
Closes-Bug: PROD-22198
diff --git a/cloud-update.groovy b/cloud-update.groovy
index d58d1e0..9fdeaad 100644
--- a/cloud-update.groovy
+++ b/cloud-update.groovy
@@ -573,14 +573,12 @@
}
try {
salt.minionsReachable(pepperEnv, 'I@salt:master', tgt)
- // purge and setup previous repos
- salt.enforceState(pepperEnv, tgt, 'linux.system.repo')
} catch (Exception e) {
common.errorMsg(e)
if (INTERACTIVE.toBoolean()) {
- input message: "Salt state linux.system.repo on ${tgt} failed. Do you want to PROCEED?."
+ input message: "Not all minions ${tgt} returned after snapshot revert. Do you want to PROCEED?."
} else {
- throw new Exception("Salt state linux.system.repo on ${tgt} failed")
+ throw new Exception("Not all minions ${tgt} returned after snapshot revert")
}
}
}