Merge "Add verification of restoration step"
diff --git a/galera-cluster-verify-restore.groovy b/galera-cluster-verify-restore.groovy
index b8826ec..2a575cc 100644
--- a/galera-cluster-verify-restore.groovy
+++ b/galera-cluster-verify-restore.groovy
@@ -29,11 +29,9 @@
if (resultCode == 129) {
common.errorMsg("Unable to obtain Galera slave minions list". "Without fixing this issue, pipeline cannot continue in verification and restoration.")
currentBuild.result = "FAILURE"
- return
} else if (resultCode == 130) {
common.errorMsg("Neither master or slaves are reachable. Without fixing this issue, pipeline cannot continue in verification and restoration.")
currentBuild.result = "FAILURE"
- return
}
}
if (resultCode == 1) {
@@ -50,5 +48,15 @@
common.errorMsg("Restoration process has failed.")
}
}
+ stage('Verify restoration result') {
+ exitCode = openstack.verifyGaleraStatus(pepperEnv, false)
+ if (exitCode >= 1) {
+ common.errorMsg("Restoration procedure was probably not successful. See verification report for more information.")
+ currentBuild.result = "FAILURE"
+ } else {
+ common.infoMsg("Restoration procedure seems to be successful. See verification report to be sure.")
+ currentBuild.result = "SUCCESS"
+ }
+ }
}
}