Add health check state into opencontrail4.0 upgrade pipeline
Change-Id: I1a81cdf8aa2b3cb4c20bfa778d341ba6352c016a
Related-PROD: PROD-23325
diff --git a/opencontrail40-upgrade.groovy b/opencontrail40-upgrade.groovy
index 52a0d23..ce44d04 100644
--- a/opencontrail40-upgrade.groovy
+++ b/opencontrail40-upgrade.groovy
@@ -63,6 +63,15 @@
if (STAGE_CONTROLLERS_UPGRADE.toBoolean() == true) {
+ stage('Opencontrail controllers health check') {
+ try {
+ salt.enforceState(pepperEnv, 'I@opencontrail:control or I@opencontrail:collector', 'opencontrail.upgrade.verify', true, true)
+ } catch (Exception er) {
+ common.errorMsg("Opencontrail controllers health check stage found issues with services. Please take a look at the logs above.")
+ throw er
+ }
+ }
+
stage('Opencontrail controllers upgrade') {
try {
salt.runSaltProcessStep(pepperEnv, 'I@opencontrail:database or I@neutron:server', 'saltutil.refresh_pillar', [], null, true)
@@ -200,6 +209,15 @@
common.infoMsg("Selected sample nodes: ${targetLiveSubset}")
}
+ stage('Compute nodes health check') {
+ try {
+ salt.enforceState(pepperEnv, targetLiveAll, 'opencontrail.upgrade.verify', true, true)
+ } catch (Exception er) {
+ common.errorMsg("Opencontrail compute nodes health check stage found issues with services. Please take a look at the logs above.")
+ throw er
+ }
+ }
+
stage('Confirm upgrade on sample nodes') {
input message: "Do you want to continue with the Opencontrail compute upgrade on the following sample nodes? ${targetLiveSubset}"
}