-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ntp: rancher, rke2-server rke2-agent need to wait for time sync #373
Conversation
Just curious, does the 180 seconds is enough for time sync? Could we have some way to check the time is synced with the NTP server? |
systemd-time-wait-sync.service will help us determine whether the time is synced. |
package/harvester-os/files/etc/systemd/system/systemd-time-wait-sync.service.d/override.conf
Show resolved
Hide resolved
OK, that makes sense to me. Just some nit on the above comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, test fresh installation with #375. Thanks!
use time-sync.target wait for 3 min to sync time if time sync took more 3 min, skip it and start rancherd, rke2-server and rke2-agent directly. Signed-off-by: Date Huang <date.huang@suse.com>
Signed-off-by: Date Huang <date.huang@suse.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested with a fresh install in a virtualized environment. Checked with the following command to see if the services are actually waiting for the time synced.
journalctl -b -u systemd-timesyncd.service -u systemd-time-wait-sync.service -u time-sync.target -u rancherd.service -u rke2-server.service -u rke2-agent.service
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please help backport the PR to the v1.1 branch, thanks. |
use time-sync.target
wait for 3 min to sync time
if time sync took more 3 min, skip it and start rancherd, rke2-server and rke2-agent directly.
issue: harvester/harvester#2860
Signed-off-by: Date Huang date.huang@suse.com