Skip to content
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

Synchronise 2024.1 with upstream #394

Merged
merged 3 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ansible/inventory/group_vars/all/time
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,17 @@ chrony_ntp_servers:

# Synchronise hardware clock with system time. Default is true.
chrony_rtcsync_enabled: true

# Force synchronisation from NTP sources. This methods may jump the clock by
# large values which can cause issues with some software. Disabled by default.
ntp_force_sync: false

# Maximum number of tries used by the `chronyc waitsync` command. Only used
# when ntp_force_sync is true. Default is 60 which waits for a maximum of 10
# minutes (60 times 10 seconds).
chrony_waitsync_max_tries: 60

# Maximum correction used by the `chronyc waitsync` command. Only used when
# ntp_force_sync is true. Default is 0.01 which waits for the remaining
# correction to be less than 10 milliseconds.
chrony_waitsync_max_correction: 0.01
8 changes: 6 additions & 2 deletions ansible/roles/ntp/tasks/sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
# NOTE(priteau): We need to run handlers to restart chronyd before forcing
# clock synchronisation, or the system clock could appear as not synchronised
# during CI jobs because the tests run too quickly after the chronyd restart.
- meta: flush_handlers

- name: Force time synchronisation
become: True
block:
Expand All @@ -9,8 +14,7 @@
command: chronyc makestep

- name: Wait before hardware clock synchronisation
pause:
seconds: 5
command: "chronyc waitsync {{ chrony_waitsync_max_tries }} {{ chrony_waitsync_max_correction }}"

- name: Force hardware clock synchronisation
command: hwclock --systohc
Expand Down
14 changes: 14 additions & 0 deletions etc/kayobe/time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
# Synchronise hardware clock with system time. Default is true.
#chrony_rtcsync_enabled:

# Force synchronisation from NTP sources. This methods may jump the clock by
# large values which can cause issues with some software. Disabled by default.
#ntp_force_sync:

# Maximum number of tries used by the `chronyc waitsync` command. Only used
# when ntp_force_sync is true. Default is 60 which waits for a maximum of 10
# minutes (60 times 10 seconds).
#chrony_waitsync_max_tries:

# Maximum correction used by the `chronyc waitsync` command. Only used when
# ntp_force_sync is true. Default is 0.01 which waits for the remaining
# correction to be less than 10 milliseconds.
#chrony_waitsync_max_correction:

###############################################################################
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes
3 changes: 3 additions & 0 deletions playbooks/kayobe-infra-vm-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ pip_upper_constraints_file: "/tmp/upper-constraints.txt"
# QEMU.
libvirt_vm_engine: "qemu"

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
3 changes: 3 additions & 0 deletions playbooks/kayobe-overcloud-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ kolla_ansible_requirements_yml: "/tmp/kolla-ansible-requirements.yml"
kolla_openstack_logging_debug: True
pip_upper_constraints_file: "/tmp/upper-constraints.txt"

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ chrony_ntp_servers:
- option: maxsources
val: 2

# Force system clock synchronisation
ntp_force_sync: True

# Enable firewalld
controller_firewalld_enabled: true
controller_firewalld_zones:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ def test_ntp_non_default_time_server(host):
assert "time.cloudflare.com" in chrony_config.content_string


# TODO(priteau): Remove once we force time sync
@pytest.mark.skipif(_is_ubuntu_noble(),
reason="Clock often fails to synchronize on Ubuntu Noble")
def test_ntp_clock_synchronized(host):
# Tests that the clock is synchronized
status_output = host.check_output("timedatectl status")
Expand Down
3 changes: 3 additions & 0 deletions playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ kolla_ansible_requirements_yml: "/tmp/previous-kolla-ansible-requirements.yml"
{% endif %}
kolla_openstack_logging_debug: true

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
3 changes: 3 additions & 0 deletions playbooks/kayobe-seed-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ kolla_ansible_requirements_yml: "/tmp/kolla-ansible-requirements.yml"
kolla_openstack_logging_debug: True
pip_upper_constraints_file: "/tmp/upper-constraints.txt"

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
3 changes: 3 additions & 0 deletions playbooks/kayobe-seed-upgrade-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ kolla_ansible_requirements_yml: "/tmp/previous-kolla-ansible-requirements.yml"
{% endif %}
kolla_openstack_logging_debug: True

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
3 changes: 3 additions & 0 deletions playbooks/kayobe-seed-vm-base/overrides.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pip_upper_constraints_file: "/tmp/upper-constraints.txt"
# QEMU.
libvirt_vm_engine: "qemu"

# Force system clock synchronisation
ntp_force_sync: True

# Use the CI infra's PyPI mirror.
pip_local_mirror: true
pip_index_url: "http://{{ zuul_site_mirror_fqdn }}/pypi/simple"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Bumps the MichaelRigart.interfaces role to v1.15.3 to fix an issue where
NetworkManager was not restarted before bouncing network interfaces.
`LP#2100792 <https://bugs.launchpad.net/kayobe/+bug/2100792>`__
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ roles:
# There are no versioned releases of this role.
version: acd08fd126d0e442ab8b3bc518e37761390d8c2f
- src: MichaelRigart.interfaces
version: v1.15.1
version: v1.15.3
- src: mrlesmithjr.chrony
version: v0.1.4
- src: mrlesmithjr.manage_lvm
Expand Down
Loading