Skip to content

Commit

Permalink
Fix race condition in initial timestamp handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertKrawitz committed Sep 13, 2022
1 parent c276ee6 commit 7591ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clusterbuster
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ function get_pod_and_local_timestamps() {
first_local_ts=$(date +%s.%N)
remote_ts=$(__OC exec "$@" -- /bin/sh -c "date +%s.%N" </dev/null) || killthemall "Unable to retrieve sync pod timestamp"
second_local_ts=$(date +%s.%N)
_OC exec --stdin=true "$@" -- /bin/sh -c "cat > '$controller_timestamp_file'" <<EOF
_OC exec --stdin=true "$@" -- /bin/sh -c "cat > '${controller_timestamp_file}.tmp' && mv '${controller_timestamp_file}.tmp' '${controller_timestamp_file}'" <<EOF
{
"first_controller_ts": $first_local_ts,
"sync_ts": $remote_ts,
Expand Down

0 comments on commit 7591ece

Please sign in to comment.