-
Notifications
You must be signed in to change notification settings - Fork 84
rootfs: configure chronyc service with makestep #318
Conversation
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.
Thanks @xs3c.
lgtm
/cc @amshinde for her thoughts. @grahamwhaley may have a view on this too from the metrics perspective.
rootfs-builder/rootfs.sh
Outdated
@@ -396,6 +396,9 @@ fi | |||
|
|||
info "Configure chrony file ${chrony_conf_file}" | |||
echo "refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0" >> ${chrony_conf_file} | |||
# Step the system clock instead of slewing it if the adjustment is larger than | |||
# one second, at any time | |||
echo "makestep 1 -1" >> ${chrony_conf_file} |
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.
Idea: this is fine, but now there are two changes to this file, you could instead do:
cat >>"${chrony_conf_file}"<<EOT
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, at any time
echo "makestep 1 -1
EOT
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.
Done
/test |
I think the idea is fine/right. I'd be interested to know:
/cc @mcastelino who I think first toyed with syncing the clocks |
The current chrony service does not step the system clock, so add the modification to do this if the adjustment is larger than one second Fixes: kata-containers#316 Signed-off-by: Yang, Wei <wei.yang1@linux.alibaba.com>
af2532d
to
add0d44
Compare
Thanks again @xs3c! 😄 |
@jodh-intel you are welcome 😄 |
lgtm, as it is generally a good practice to makestep esp if the host goes to sleep. @grahamwhaley I have also being toying with the idea of adding a systemd ordering for the agent and chrony, to make sure we start the agent after chrony has fully started up(perhaps allowing it to sync the time before any workload is started by the agent). |
/test |
Restarted ARM CI now that #265 has landed. |
Hi~ @amshinde
should be fixed by #320. I will restart to see how it works now. ;) |
we have all green here~~~~🎉🎊 |
The current chrony service does not step the system clock,
so add the modification to do this if the adjustment is
larger than one second
Fixes: #316
Signed-off-by: Yang, Wei wei.yang1@linux.alibaba.com