File tree Expand file tree Collapse file tree 12 files changed +59
-5
lines changed
kayobe-overcloud-host-configure-base
kayobe-overcloud-upgrade-base Expand file tree Collapse file tree 12 files changed +59
-5
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,17 @@ chrony_ntp_servers:
38
38
39
39
# Synchronise hardware clock with system time. Default is true.
40
40
chrony_rtcsync_enabled: true
41
+
42
+ # Force synchronisation from NTP sources. This methods may jump the clock by
43
+ # large values which can cause issues with some software. Disabled by default.
44
+ ntp_force_sync: false
45
+
46
+ # Maximum number of tries used by the `chronyc waitsync` command. Only used
47
+ # when ntp_force_sync is true. Default is 60 which waits for a maximum of 10
48
+ # minutes (60 times 10 seconds).
49
+ chrony_waitsync_max_tries: 60
50
+
51
+ # Maximum correction used by the `chronyc waitsync` command. Only used when
52
+ # ntp_force_sync is true. Default is 0.01 which waits for the remaining
53
+ # correction to be less than 10 milliseconds.
54
+ chrony_waitsync_max_correction: 0.01
Original file line number Diff line number Diff line change 1
1
---
2
+ # NOTE(priteau): We need to run handlers to restart chronyd before forcing
3
+ # clock synchronisation, or the system clock could appear as not synchronised
4
+ # during CI jobs because the tests run too quickly after the chronyd restart.
5
+ - meta : flush_handlers
6
+
2
7
- name : Force time synchronisation
3
8
become : True
4
9
block :
9
14
command : chronyc makestep
10
15
11
16
- name : Wait before hardware clock synchronisation
12
- pause :
13
- seconds : 5
17
+ command : " chronyc waitsync {{ chrony_waitsync_max_tries }} {{ chrony_waitsync_max_correction }}"
14
18
15
19
- name : Ensure hwclock is installed
16
20
package :
Original file line number Diff line number Diff line change 33
33
# Synchronise hardware clock with system time. Default is true.
34
34
# chrony_rtcsync_enabled:
35
35
36
+ # Force synchronisation from NTP sources. This methods may jump the clock by
37
+ # large values which can cause issues with some software. Disabled by default.
38
+ # ntp_force_sync:
39
+
40
+ # Maximum number of tries used by the `chronyc waitsync` command. Only used
41
+ # when ntp_force_sync is true. Default is 60 which waits for a maximum of 10
42
+ # minutes (60 times 10 seconds).
43
+ # chrony_waitsync_max_tries:
44
+
45
+ # Maximum correction used by the `chronyc waitsync` command. Only used when
46
+ # ntp_force_sync is true. Default is 0.01 which waits for the remaining
47
+ # correction to be less than 10 milliseconds.
48
+ # chrony_waitsync_max_correction:
49
+
36
50
# ##############################################################################
37
51
# Dummy variable to allow Ansible to accept this file.
38
52
workaround_ansible_issue_8743 : yes
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ pip_upper_constraints_file: "/tmp/upper-constraints.txt"
15
15
# QEMU.
16
16
libvirt_vm_engine: "qemu"
17
17
18
+ # Force system clock synchronisation
19
+ ntp_force_sync: True
20
+
18
21
# Use the CI infra's PyPI mirror.
19
22
pip_local_mirror: true
20
23
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ kolla_ansible_requirements_yml: "/tmp/kolla-ansible-requirements.yml"
15
15
kolla_openstack_logging_debug: True
16
16
pip_upper_constraints_file: "/tmp/upper-constraints.txt"
17
17
18
+ # Force system clock synchronisation
19
+ ntp_force_sync: True
20
+
18
21
# Use the CI infra's PyPI mirror.
19
22
pip_local_mirror: true
20
23
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Original file line number Diff line number Diff line change @@ -196,6 +196,9 @@ chrony_ntp_servers:
196
196
- option: maxsources
197
197
val: 2
198
198
199
+ # Force system clock synchronisation
200
+ ntp_force_sync: True
201
+
199
202
# Enable firewalld
200
203
controller_firewalld_enabled: true
201
204
controller_firewalld_zones:
Original file line number Diff line number Diff line change @@ -204,9 +204,6 @@ def test_ntp_non_default_time_server(host):
204
204
assert "time.cloudflare.com" in chrony_config .content_string
205
205
206
206
207
- # TODO(priteau): Remove once we force time sync
208
- @pytest .mark .skipif (_is_ubuntu_noble (),
209
- reason = "Clock often fails to synchronize on Ubuntu Noble" )
210
207
def test_ntp_clock_synchronized (host ):
211
208
# Tests that the clock is synchronized
212
209
status_output = host .check_output ("timedatectl status" )
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ kolla_ansible_requirements_yml: "/tmp/previous-kolla-ansible-requirements.yml"
19
19
{% endif %}
20
20
kolla_openstack_logging_debug: true
21
21
22
+ # Force system clock synchronisation
23
+ ntp_force_sync: True
24
+
22
25
# Use the CI infra's PyPI mirror.
23
26
pip_local_mirror: true
24
27
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ kolla_ansible_requirements_yml: "/tmp/kolla-ansible-requirements.yml"
17
17
kolla_openstack_logging_debug: True
18
18
pip_upper_constraints_file: "/tmp/upper-constraints.txt"
19
19
20
+ # Force system clock synchronisation
21
+ ntp_force_sync: True
22
+
20
23
# Use the CI infra's PyPI mirror.
21
24
pip_local_mirror: true
22
25
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ kolla_ansible_requirements_yml: "/tmp/previous-kolla-ansible-requirements.yml"
19
19
{% endif %}
20
20
kolla_openstack_logging_debug: True
21
21
22
+ # Force system clock synchronisation
23
+ ntp_force_sync: True
24
+
22
25
# Use the CI infra's PyPI mirror.
23
26
pip_local_mirror: true
24
27
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
You can’t perform that action at this time.
0 commit comments