From 373a27163e0365919f707604df5b61863029d2e4 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Tue, 15 Oct 2019 11:23:29 +0100 Subject: [PATCH] Replace chronyc "waitsync" with "makestep" Prior to this patch we had the "chrony waitsync" command with a hardcoded timeout of "20". Sometimes that wasn't enough when deploying on some slower machines in my experience [0]. This patch is changing the "waitsync" command to "makestep", that way we tell chronyd to make the system clock correct immediately (instead of gradually correcting the time). It should be fine for our usecase because these are ran during the deployment. [0] http://paste.openstack.org/show/783888/ Change-Id: I07057eb089585f43346c44a03ae50aa2ac837fd7 Signed-off-by: Lucas Alvares Gomes --- deployment/timesync/chrony-baremetal-ansible.yaml | 2 +- firstboot/userdata_timesync.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/timesync/chrony-baremetal-ansible.yaml b/deployment/timesync/chrony-baremetal-ansible.yaml index 444da4b048..648f1645ce 100644 --- a/deployment/timesync/chrony-baremetal-ansible.yaml +++ b/deployment/timesync/chrony-baremetal-ansible.yaml @@ -122,7 +122,7 @@ outputs: - name: Ensure chrony has been restarted meta: flush_handlers - name: Ensure system is NTP time synced - command: chronyc waitsync 20 + command: chronyc makestep ansible_group_vars: chrony_role_action: all chrony_ntp_servers: {get_param: NtpServer} diff --git a/firstboot/userdata_timesync.yaml b/firstboot/userdata_timesync.yaml index 1802b436e2..10810324e1 100644 --- a/firstboot/userdata_timesync.yaml +++ b/firstboot/userdata_timesync.yaml @@ -74,7 +74,7 @@ resources: set -x if [ "$service" = "chrony" ]; then if command -v chronyc >/dev/null; then - chronyc waitsync 20 + chronyc makestep else echo "No chronyc available, skipping sync" fi