Skip to content

Geo: Improve rake check behavior regarding the default NTP server not being reachable

What does this MR do and why?

When running the Geo rake check, when the machine is in an air-gapped environment it will fail with the following error messages:

Machine clock is synchronized ... Exception: Timeout::Error

If the default pool.ntp.org domain is mapped to another IP that does not provide NTP service:

Machine clock is synchronized ... Exception: No route to host - recvfrom(2)

We improve the behavior here by introducing the following changes:

  1. Modify the error message to make it into a warning rather than a "hard failure"
  2. Modify the error check to allow the user to specify a different NTP server and parameters using ENV variables

The following ENV variables are available:

  • NTP_HOST
  • NTP_PORT
  • NTP_TIMEOUT

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #381422 (closed) #381426 (closed)

Edited by Gabriel Mazetto

Merge request reports