Skip to content

Commit

Permalink
fix physical restore
Browse files Browse the repository at this point in the history
  • Loading branch information
pooknull committed Nov 7, 2024
1 parent 225f7bd commit 1b3a450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/physical-restore-ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ log=/tmp/pbm-agent.log

touch /opt/percona/restore-in-progress

/opt/percona/pbm-agent 1>&2 2>${log} &
/opt/percona/pbm-entry.sh /opt/percona/pbm-agent 1>&2 2>${log} &
/opt/percona/ps-entry.sh "$@" 1>&2 2>/tmp/mongod.log

echo "Physical restore in progress"
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1498,10 +1498,10 @@ get_latest_restorable_time() {
# "pbm-agent status" can return different timestamp in first few seconds
# we need to get it twice to be sure that timestamp was not changed
until [[ $first_timestamp != "" && $first_timestamp != "null" && $first_timestamp == $second_timestamp ]]; do
first_timestamp=$(kubectl_bin exec "$cluster-0" -c backup-agent -- pbm status -o json | jq '.backups.pitrChunks.pitrChunks | last | .range.end')
first_timestamp=$(kubectl_bin exec "$cluster-0" -c backup-agent -- /opt/percona/pbm-entry.sh pbm status -o json | jq '.backups.pitrChunks.pitrChunks | last | .range.end')
sleep 5
if [[ $first_timestamp != "" && $first_timestamp != "null" ]]; then
second_timestamp=$(kubectl_bin exec "$cluster-0" -c backup-agent -- pbm status -o json | jq '.backups.pitrChunks.pitrChunks | last | .range.end')
second_timestamp=$(kubectl_bin exec "$cluster-0" -c backup-agent -- /opt/percona/pbm-entry.sh pbm status -o json | jq '.backups.pitrChunks.pitrChunks | last | .range.end')
fi
let retry+=1
if [[ $retry -gt 30 ]]; then
Expand Down

0 comments on commit 1b3a450

Please sign in to comment.