Do not create db backup in Cassandra restore pipeline
Cassandra restore pipeline should not perform any backups before
restore procedure, it's purpose only restore steps. If backup is
needed, separate steps/pipeline can be used.
Change-Id: I916c3053db82f5e3b3e69c3883af584decec10a0
Related-PROD: PROD-31351
diff --git a/restore-cassandra.groovy b/restore-cassandra.groovy
index b80f8ae..bdcf2cd 100644
--- a/restore-cassandra.groovy
+++ b/restore-cassandra.groovy
@@ -37,10 +37,6 @@
}
}
- stage('Backup') {
- salt.cmdRun(pepperEnv, 'I@cassandra:backup:client', 'bash /usr/local/bin/cassandra-backup-runner-call.sh')
- }
-
stage('Restore') {
// get opencontrail version
def contrailVersion = getValueForPillarKey(pepperEnv, "I@opencontrail:control:role:primary", "_param:opencontrail_version")
@@ -67,13 +63,13 @@
common.errorMsg('An error has been occurred during cassandra db startup: ' + err.getMessage())
throw err
}
- // remove restore-already-happenned file if any is present
+ // remove restore-already-happened file if any is present
try {
salt.cmdRun(pepperEnv, 'I@cassandra:backup:client', 'rm /var/backups/cassandra/dbrestored')
} catch (Exception err) {
common.warningMsg('/var/backups/cassandra/dbrestored not present? ' + err.getMessage())
}
- // perform actual backup
+ // perform restore steps
salt.enforceState(pepperEnv, 'I@cassandra:backup:client', "cassandra")
salt.runSaltProcessStep(pepperEnv, 'I@cassandra:backup:client', 'system.reboot', null, [], true, 5)
sleep(5)