From 94b91727a2bc6ee6ea85ccae28277d345772cff9 Mon Sep 17 00:00:00 2001 From: Grzegorz Koper Date: Wed, 26 Mar 2025 15:22:22 +0100 Subject: [PATCH] Improve Ironic pin_release_version configuration This change improves the configuration of Ironic's pin_release_version setting by: 1. Renaming the variable from openstack_previous_release_name to ironic_pin_release_version to better reflect its purpose 2. Making the setting optional by default 3. Adding proper documentation explaining when to use this setting See: https://docs.openstack.org/ironic/latest/configuration/config.html#DEFAULT.pin_release_version Change-Id: Iaecc2a5999ff1dbc5abf56d400f9b9ac5293d1d7 --- ansible/group_vars/all.yml | 3 --- ansible/roles/ironic/defaults/main.yml | 8 ++++++++ ansible/roles/ironic/tasks/rolling_upgrade.yml | 8 ++++++-- ...e-ironic-pin-release-version-8f9e2b3c4d5a6b7c.yaml | 11 +++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/improve-ironic-pin-release-version-8f9e2b3c4d5a6b7c.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 859fbeb2e2..71dc04a815 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -779,9 +779,6 @@ openstack_logging_debug: "False" openstack_region_name: "RegionOne" -# Variable defined the pin_release_version, apply for rolling upgrade process -openstack_previous_release_name: "2024.1" - # A list of policy file formats that are supported by Oslo.policy supported_policy_format_list: - policy.yaml diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml index 3caede368a..c0ba474eb5 100644 --- a/ansible/roles/ironic/defaults/main.yml +++ b/ansible/roles/ironic/defaults/main.yml @@ -390,3 +390,11 @@ ironic_ks_user_roles: ironic_enable_tls_backend: "{{ kolla_enable_tls_backend }}" ironic_copy_certs: "{{ kolla_copy_ca_into_containers | bool or ironic_enable_tls_backend | bool }}" + +# Configuration for Ironic rolling upgrades +# This variable controls the pin_release_version setting in Ironic +# It should only be set when performing a slow rolling upgrade process +# where you need to maintain compatibility between different versions +# during the upgrade. For direct version jumps, this should be unset. +# See: https://docs.openstack.org/ironic/latest/configuration/config.html#DEFAULT.pin_release_version +ironic_pin_release_version: "" diff --git a/ansible/roles/ironic/tasks/rolling_upgrade.yml b/ansible/roles/ironic/tasks/rolling_upgrade.yml index d3577e4122..66a86fcf6e 100644 --- a/ansible/roles/ironic/tasks/rolling_upgrade.yml +++ b/ansible/roles/ironic/tasks/rolling_upgrade.yml @@ -1,10 +1,14 @@ --- - import_tasks: config-host.yml -# Pin release version +# Pin release version for rolling upgrades +# This is only needed when performing a slow rolling upgrade process +# where you need to maintain compatibility between different versions +# during the upgrade. For direct version jumps, this section can be skipped. - import_tasks: config.yml vars: - pin_release_version: "{{ openstack_previous_release_name }}" + pin_release_version: "{{ ironic_pin_release_version }}" + when: ironic_pin_release_version | length > 0 - import_tasks: check-containers.yml diff --git a/releasenotes/notes/improve-ironic-pin-release-version-8f9e2b3c4d5a6b7c.yaml b/releasenotes/notes/improve-ironic-pin-release-version-8f9e2b3c4d5a6b7c.yaml new file mode 100644 index 0000000000..817006fc76 --- /dev/null +++ b/releasenotes/notes/improve-ironic-pin-release-version-8f9e2b3c4d5a6b7c.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + Improved the configuration of Ironic's pin_release_version setting by: + + - Dropping variable ``openstack_previous_release_name`` and replacing + it with ``ironic_pin_release_version`` + - Making the setting optional by default + - Adding proper documentation explaining when to use this setting + + See `documentation for pin_release_version `_ for more details.