Skip to content

Commit

Permalink
Reduce timeout to 1 minute
Browse files Browse the repository at this point in the history
Reason: chronyc does not work properly if network is not working
right after boot. Having shorter timeout will make the container
crash after one minute and try again.
  • Loading branch information
maseabunikie committed Dec 19, 2023
1 parent 7e8a5f4 commit 227827f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ if [ -z ${SKIP_TIMESYNC_WAIT} ] ||
# Start chrony client and wait for timesync before doing anything.
# If timeout happens the script will give error and container exit with error.
# Docker daemon will restart the container.
echo "INFO: chronyc in MicroXRCEAgent waiting for time sync (3 minutes timeout)."
echo "INFO: chronyc in MicroXRCEAgent waiting for time sync (1 minute timeout)."
# waitsync [max-tries [max-correction [max-skew [interval]]]]
# if max-correction and max-skew are 0 then the value is not checked.
/usr/bin/chronyc -n -h 127.0.0.1 waitsync 18 0 0 10
/usr/bin/chronyc -n -h 127.0.0.1 waitsync 30 0 0 2
echo "INFO: time sync achieved."
fi

Expand Down

0 comments on commit 227827f

Please sign in to comment.