Browse Source

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 <lucasagomes@gmail.com>
changes/72/688672/2
Lucas Alvares Gomes 2 years ago
parent
commit
373a27163e
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      deployment/timesync/chrony-baremetal-ansible.yaml
  2. +1
    -1
      firstboot/userdata_timesync.yaml

+ 1
- 1
deployment/timesync/chrony-baremetal-ansible.yaml View File

@ -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}


+ 1
- 1
firstboot/userdata_timesync.yaml View File

@ -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


Loading…
Cancel
Save