Skip to content

Commit

Permalink
Merge pull request #24308 from retroflexer/modified-backup-restore-en…
Browse files Browse the repository at this point in the history
…tails-fixing-dr-scripts

tests: Correct the backup restore script usage in the disaster recovery tests
  • Loading branch information
openshift-merge-robot committed Dec 20, 2019
2 parents f8c1b4a + 84e2bfd commit bf249e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/extended/dr/quorum_restore.go
Expand Up @@ -136,9 +136,9 @@ var _ = g.Describe("[Feature:DisasterRecovery][Disruptive]", func() {
}

framework.Logf("Perform etcd backup on remaining machine %s (machine %s)", survivingNodeName, survivingMachineName)
expectSSH("sudo rm -f /root/assets/backup/snapshot.db; sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-backup.sh /root/assets/backup/snapshot.db", survivingNode)
expectSSH("sudo -i /bin/bash -c 'rm -f /root/assets/backup/snapshot*'; sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-backup.sh /root/assets/backup", survivingNode)
framework.Logf("Restore etcd on remaining node %s (machine %s)", survivingNodeName, survivingMachineName)
expectSSH(fmt.Sprintf("sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-restore.sh /root/assets/backup/snapshot.db %s", etcdConnectionString), survivingNode)
expectSSH(fmt.Sprintf("sudo -i /bin/bash -c '/bin/bash -x /usr/local/bin/etcd-snapshot-restore.sh /root/assets/backup/snapshot* %s'", etcdConnectionString), survivingNode)

framework.Logf("Wait for API server to come up")
time.Sleep(30 * time.Second)
Expand Down
3 changes: 2 additions & 1 deletion test/extended/dr/restore_from_snapshot.go
Expand Up @@ -65,7 +65,8 @@ var _ = g.Describe("[Feature:DisasterRecovery][Disruptive]", func() {
e2e.Logf("first master: %v", firstMaster)

e2e.Logf("Make etcd backup on first master")
expectSSH("sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-backup.sh /root/assets/backup/snapshot.db", firstMaster)
expectSSH("sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-backup.sh /root/assets/backup", firstMaster)
expectSSH("sudo -i /bin/bash -c '/bin/tar -xzf /root/assets/backup/snapshot* -C /root/assets/backup snapshot.db'", firstMaster)
expectSSH("sudo -i install -o core -g core /root/assets/backup/snapshot.db /tmp/snapshot.db", firstMaster)

setMachineConfig("rollback-B.yaml", oc, mcps)
Expand Down

0 comments on commit bf249e6

Please sign in to comment.