From d9d3ce157819262be3d5a1e782f64bc542bd1df6 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Tue, 18 Oct 2022 09:33:53 +0200 Subject: [PATCH] Removed tasks using unsupported NIC config script `merge-new-params-nic-config-script.py`from Tripleo Heat Templates is no longer supported and will be removed for Zed release along with the `convert_nic_config.py`. Tasks using these scripts have to be be removed as well. This includes indirect usage, and inclusion of the tasks in FFU process. Related: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/860691 Signed-off-by: Jiri Podivin Change-Id: If769954dea48cba5b9cc52871a18735e8520a0ab --- tasks/common/convert_nic_template.yaml | 33 --------------- tasks/common/convert_nic_templates.yaml | 10 ----- .../rocky_to_stein_adjust_nic_templates.yaml | 41 ------------------- tasks/fast-forward-upgrade/main.yml | 4 -- 4 files changed, 88 deletions(-) delete mode 100644 tasks/common/convert_nic_template.yaml delete mode 100644 tasks/common/convert_nic_templates.yaml delete mode 100644 tasks/common/rocky_to_stein_adjust_nic_templates.yaml diff --git a/tasks/common/convert_nic_template.yaml b/tasks/common/convert_nic_template.yaml deleted file mode 100644 index 0d102440..00000000 --- a/tasks/common/convert_nic_template.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: set nic_config_env fact - set_fact: - nic_config_env: "{{ item.item }}" - when: item.stdout|length > 0 - -- block: - - name: register nic templates files defined in the environment file - shell: | - set -o pipefail - awk -F': ' '/OS::TripleO::.*::Net::SoftwareConfig/ {print $2}' {{ nic_config_env }} - register: nic_template_files - - - name: run parameters conversion script - vars: - relative_path: "{{ '/'.join(nic_config_env.split('/')[0:-1]) + '/' + item }}" - nic_path: "{{ (item[0] == '/')|ternary(item, relative_path) }}" - shell: | - set -o pipefail - NIC_ROLE_NAME=$( grep {{ item }} {{ nic_config_env }} | awk -F '::' '{ print $3 }' ) - /usr/share/openstack-tripleo-heat-templates/tools/merge-new-params-nic-config-script.py \ - -n {{ network_data_file | default(default_network_data, true) }} \ - --tht-dir {{ tht_directory }} \ - --role-name $NIC_ROLE_NAME \ - --roles-data {{ roles_data }} \ - --discard-comments yes \ - --template {{ nic_path }} - when: - - "(item[0] == '/' and tht_directory not in item) or \ - (item[0] != '/' and tht_directory not in '/'.join(nic_config_env.split('/')[0:-1]))" - loop: "{{ nic_template_files.stdout_lines }}" - - when: nic_config_env is defined diff --git a/tasks/common/convert_nic_templates.yaml b/tasks/common/convert_nic_templates.yaml deleted file mode 100644 index 2618da70..00000000 --- a/tasks/common/convert_nic_templates.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: look for network software config - shell: | - grep "OS::TripleO::.*::Net::SoftwareConfig" {{ item }} - ignore_errors: true - register: nic_config_envs - loop: "{{ initial_env_file.stdout_lines }}" - -- include_tasks: convert_nic_template.yaml - loop: "{{ nic_config_envs.results }}" diff --git a/tasks/common/rocky_to_stein_adjust_nic_templates.yaml b/tasks/common/rocky_to_stein_adjust_nic_templates.yaml deleted file mode 100644 index e3ddb0c7..00000000 --- a/tasks/common/rocky_to_stein_adjust_nic_templates.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- name: look for network software config - shell: | - grep "OS::TripleO::.*::Net::SoftwareConfig" {{ item }} - ignore_errors: true - register: nic_config_envs - loop: "{{ initial_env_file.stdout_lines }}" - -- name: set nic_config_env fact - set_fact: - nic_config_env: "{{ item.item }}" - when: item.stdout|length > 0 - loop: "{{ nic_config_envs.results }}" - -- block: - - name: register nic templates files defined in the environment file - shell: | - set -o pipefail - awk -F': ' '/OS::TripleO::.*::Net::SoftwareConfig/ {print $2}' {{ nic_config_env }} - register: nic_template_files - - - name: add Stein specific parameters to NICs - vars: - relative_path: "{{ '/'.join(nic_config_env.split('/')[0:-1]) + '/' + item }}" - nic_path: "{{ (item[0] == '/')|ternary(item, relative_path) }}" - python_bin: "{{ 'python' if use_oooq|bool else 'python3' }}" - shell: | - set -o pipefail - NIC_ROLE_NAME=$( grep {{ item }} {{ nic_config_env }} | awk -F '::' '{ print $3 }' ); - {{ python_bin }} /usr/share/openstack-tripleo-heat-templates/tools/merge-new-params-nic-config-script.py \ - --tht-dir {{ tht_directory }} \ - --role-name $NIC_ROLE_NAME \ - --roles-data {{ roles_data }} \ - --discard-comments yes \ - --template {{ nic_path }} - when: - - "(item[0] == '/' and tht_directory not in item) or \ - (item[0] != '/' and tht_directory not in '/'.join(nic_config_env.split('/')[0:-1]))" - loop: "{{ nic_template_files.stdout_lines }}" - - when: nic_config_env is defined diff --git a/tasks/fast-forward-upgrade/main.yml b/tasks/fast-forward-upgrade/main.yml index 2bf6c06d..e3d7f933 100644 --- a/tasks/fast-forward-upgrade/main.yml +++ b/tasks/fast-forward-upgrade/main.yml @@ -152,10 +152,6 @@ - overcloud_upgrade_prepare - upgrades_validations - - name: convert nic templates - import_tasks: ../common/convert_nic_templates.yaml - tags: ffu_overcloud_prepare - - name: convert tls templates import_tasks: convert_tls_templates.yaml tags: ffu_overcloud_prepare