From 89849c1ceceb55d7af34a466b16eccbf3b45a0a6 Mon Sep 17 00:00:00 2001 From: Matt Anson Date: Thu, 21 Nov 2024 14:26:26 +0000 Subject: [PATCH] Ensure ironic-python-agent matches ironic-lib If ironic-python-agent is not installed in the IPA image using upper-constraints, the ironic-lib selected by pip for installation may be newer than ipa. Use upper-constraints for the same version as ironic-python-agent when installing it, by passing the DIB_REPOREF_requirements environment variable to ironic-python-agent-builder. Closes-Bug: #2089263 Change-Id: I6e33f9897dc7efc57987872ffccdfbe0fc78cc52 --- ansible/inventory/group_vars/all/ipa | 1 + .../reference/ironic-python-agent.rst | 17 ++++++++--------- .../pin-ipa-requirements-f9566011b2400e6c.yaml | 6 ++++++ 3 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/pin-ipa-requirements-f9566011b2400e6c.yaml diff --git a/ansible/inventory/group_vars/all/ipa b/ansible/inventory/group_vars/all/ipa index 9a5042f9f..69f6e4e32 100644 --- a/ansible/inventory/group_vars/all/ipa +++ b/ansible/inventory/group_vars/all/ipa @@ -50,6 +50,7 @@ ipa_build_dib_env_default: DIB_RELEASE: "{{ '9-stream' if os_distribution == 'rocky' else os_release }}" 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 }}" # Dictionary of additional environment variables to provide to Diskimage # Builder (DIB) during IPA image build. diff --git a/doc/source/configuration/reference/ironic-python-agent.rst b/doc/source/configuration/reference/ironic-python-agent.rst index 69d58824f..efc30d296 100644 --- a/doc/source/configuration/reference/ironic-python-agent.rst +++ b/doc/source/configuration/reference/ironic-python-agent.rst @@ -62,15 +62,14 @@ image build``. ``ipa_build_dib_elements_extra``. ``ipa_build_dib_env_default`` Dictionary of default environment variables to provide to Diskimage Builder - (DIB) during IPA image build. Default is - ``{"DIB_RELEASE": "9-stream", "DIB_REPOLOCATION_ironic_python_agent": "{{ - ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{ - ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{ - openstack_branch }}"}`` if ``os_distribution`` is ``"rocky"`` else - ``{"DIB_RELEASE": "jammy", "DIB_REPOLOCATION_ironic_python_agent": "{{ - ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{ - ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{ - openstack_branch }}"}``. + (DIB) during IPA image build. Default is ``{"DIB_RELEASE": "9-stream", + "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 }}"}`` if + ``os_distribution`` is ``"rocky"`` else ``{"DIB_RELEASE": "{{ os_release + }}", "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 }}"}``. ``ipa_build_dib_env_extra`` Dictionary of additional environment variables to provide to Diskimage Builder (DIB) during IPA image build. Default is empty. diff --git a/releasenotes/notes/pin-ipa-requirements-f9566011b2400e6c.yaml b/releasenotes/notes/pin-ipa-requirements-f9566011b2400e6c.yaml new file mode 100644 index 000000000..9f64be344 --- /dev/null +++ b/releasenotes/notes/pin-ipa-requirements-f9566011b2400e6c.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Pin requirements for IPA image build to ensure that the ``ironic-lib`` + version matches ``ironic-python-agent``. + LP#2089263 `__