Skip to content
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
31 changes: 21 additions & 10 deletions ansible/inventory/group_vars/all/ipa
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# Whether to build IPA images from source.
ipa_build_images: False

# Override the OS distribution used to build IPA images. Default is 'centos'
# if the host OS is Rocky, otherwise the default is the host OS distribution.
ipa_build_distro: "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"

# Override the OS release used to build IPA images. Default is '9-stream' if
# the host OS is Rocky, otherwise the default is the host OS release.
ipa_build_release: "{{ '9-stream' if os_distribution == 'rocky' else os_release }}"

# URL of IPA source repository.
ipa_build_source_url: "https://opendev.org/openstack/ironic-python-agent"

Expand All @@ -23,16 +31,16 @@ ipa_builder_source_version: "{{ openstack_branch }}"
ipa_build_dib_host_packages_extra: []

# List of default Diskimage Builder (DIB) elements to use when building IPA
# images. Default is ["centos", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] when os_distribution is "rocky", and
# ["ubuntu", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] otherwise.
# images. Default is ["rocky-container", "dynamic-login",
# "enable-serial-console", "ironic-python-agent-ramdisk", "baremetal"] when
# ipa_build_distro is "rocky", and [ipa_build_distro, "dynamic-login",
# "enable-serial-console", "ironic-python-agent-ramdisk"] otherwise.
ipa_build_dib_elements_default:
# TODO(mattcrees): Use {{ os_distribution }} here when Rocky IPA builds work.
- "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"
- "{{ 'rocky-container' if ipa_build_distro == 'rocky' else ipa_build_distro }}"
- dynamic-login
- enable-serial-console
- ironic-python-agent-ramdisk
- "{{ 'baremetal' if ipa_build_distro == 'rocky' else '' }}"

# List of additional Diskimage Builder (DIB) elements to use when building IPA
# images. Default is none.
Expand All @@ -48,8 +56,9 @@ ipa_build_dib_elements: >
# Dictionary of default environment variables to provide to Diskimage Builder
# (DIB) during IPA image build.
ipa_build_dib_env_default:
# TODO(mattcrees): Use {{ os_release }} here when Rocky IPA builds work.
DIB_RELEASE: "{{ '9-stream' if os_distribution == 'rocky' else os_release }}"
DIB_RELEASE: "{{ ipa_build_release }}"
DIB_CONTAINERFILE_RUNTIME: "{{ container_engine }}"
DIB_CONTAINERFILE_RUNTIME_ROOT: "{{ (container_engine == 'podman') | int }}"
DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_build_source_url }}"
DIB_REPOREF_ironic_python_agent: "{{ ipa_build_source_version }}"
DIB_REPOREF_requirements: "{{ ipa_build_source_version }}"
Expand Down Expand Up @@ -83,8 +92,10 @@ ipa_build_dib_git_elements_extra: []
ipa_build_dib_git_elements: >-
{{ ipa_build_dib_git_elements_default + ipa_build_dib_git_elements_extra }}

# List of DIB packages to install. Default is none.
ipa_build_dib_packages: []
# List of DIB packages to install. Default is ["python3-yaml"] when
# when ipa_build_distro is "rocky", otherwise [].
ipa_build_dib_packages: >-
{{ ["python3-yaml"] if ipa_build_distro == 'rocky' else [] }}

# Upper constraints file for installing packages in the virtual environment
# used for building IPA images. Default is {{ pip_upper_constraints_file }}.
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/ntp/tasks/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@

- name: Force hardware clock synchronisation
command: hwclock --systohc

- name: Wait for system clock to be synchronized (up to 10 minutes)
become: True
ansible.builtin.command: timedatectl show --property=NTPSynchronized --value
register: sync_check
until: sync_check.stdout | trim == "yes"
retries: 60
delay: 10
failed_when: sync_check.rc != 0
when: ntp_force_sync | bool
19 changes: 14 additions & 5 deletions etc/kayobe/ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# Whether to build IPA images from source.
#ipa_build_images:

# Override the OS distribution used to build IPA images. Default is 'centos'
# if the host OS is Rocky, otherwise the default is the host OS distribution.
#ipa_build_distro:

# Override the OS release used to build IPA images. Default is '9-stream' if
# the host OS is Rocky, otherwise the default is the host OS release.
#ipa_build_release:

# URL of IPA source repository.
#ipa_build_source_url:

Expand All @@ -23,10 +31,10 @@
#ipa_build_dib_host_packages_extra:

# List of default Diskimage Builder (DIB) elements to use when building IPA
# images. Default is ["centos", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] when os_distribution is "rocky", and
# ["ubuntu", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] otherwise.
# images. Default is ["rocky-container", "dynamic-login",
# "enable-serial-console", "ironic-python-agent-ramdisk", "baremetal"] when
# ipa_build_distro is "rocky", and [ipa_build_distro, "dynamic-login",
# "enable-serial-console", "ironic-python-agent-ramdisk"] otherwise.
#ipa_build_dib_elements_default:

# List of additional Diskimage Builder (DIB) elements to use when building IPA
Expand Down Expand Up @@ -64,7 +72,8 @@
# ipa_build_dib_git_elements_default and ipa_build_dib_git_elements_extra.
#ipa_build_dib_git_elements:

# List of DIB packages to install. Default is none.
# List of DIB packages to install. Default is ["python3-yaml"] when
# when ipa_build_distro is "rocky", otherwise [].
#ipa_build_dib_packages:

# Upper constraints file for installing packages in the virtual environment
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
fixes:
- |
Reduces clock synchronisation race conditions before running Kolla by
waiting for ``timedatectl`` to report ``NTPSynchronized=yes`` when
``ntp_force_sync`` is enabled.

This improves reliability of deployments where services are sensitive to
clock skew immediately after NTP configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
The OS distribution and release used to build IPA images can now
be customised using the `ipa_build_distro` and `ipa_build_release`
overrides.
Loading