Fix variables for workaround variables.

Drop invalid workarounds keywords
- pre_docker_composable_upgrade_workarounds
- pre_nova_compute_upgrade_workarounds
- pre_docker_converge_upgrade_workarounds
- post_docker_converge_upgrade_workarounds
and use appropriate one:
- pre_overcloud_upgrade_workarounds
- post_overcloud_upgrade_workarounds
- pre_overcloud_upgrade_converge_workarounds
- post_overcloud_upgrade_converge_workarounds

Change-Id: I97eae282bf1ec47b012b89f74b682e6880a7838c
This commit is contained in:
Yurii Prokulevych 2018-10-23 08:11:02 +02:00
parent ed4cdcc948
commit 8cdda0ed23
2 changed files with 96 additions and 73 deletions

View File

@ -106,7 +106,7 @@
- name: apply pre overcloud upgrade converge workarounds
shell: |
set -o pipefail
bash {{ working_dir }}/pre_overcloud_converge_workarounds.sh 2>&1 {{ timestamper_cmd }} > pre_overcloud_converge_workarounds.log
bash {{ working_dir }}/pre_overcloud_upgrade_converge_workarounds.sh 2>&1 {{ timestamper_cmd }} > pre_overcloud_upgrade_converge_workarounds.log
args:
chdir: "{{working_dir}}"
when: upgrade_workarounds
@ -118,7 +118,7 @@
- name: apply post overcloud upgrade converge workarounds
shell: |
set -o pipefail
bash {{ working_dir }}/post_overcloud_converge_workarounds.sh 2>&1 {{ timestamper_cmd }} > post_overcloud_converge_workarounds.log
bash {{ working_dir }}/post_overcloud_upgrade_converge_workarounds.sh 2>&1 {{ timestamper_cmd }} > post_overcloud_upgrade_converge_workarounds.log
args:
chdir: "{{working_dir}}"
when: upgrade_workarounds

View File

@ -29,92 +29,115 @@ function apply_patch {
}
{% if 'pre_undercloud_upgrade_workarounds' in item %}
{% for bugs in pre_undercloud_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% if 'pre_undercloud_upgrade_workarounds' in item -%}
{% for bugs in pre_undercloud_upgrade_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% elif 'post_undercloud_upgrade_workarounds' in item %}
{% for bugs in post_undercloud_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish pre_undercloud_upgrade_workarounds #}
{% if 'post_undercloud_upgrade_workarounds' in item -%}
{% for bugs in post_undercloud_upgrade_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% elif 'pre_docker_composable_upgrade_workarounds' in item %}
{% for bugs in pre_docker_composable_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish post_undercloud_upgrade_workarounds #}
{% if 'pre_overcloud_upgrade_prepare_workarounds' in item -%}
{% for bugs in pre_overcloud_upgrade_prepare_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% elif 'pre_nova_compute_upgrade_workarounds' in item %}
{% for bugs in pre_nova_compute_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish pre_overcloud_upgrade_prepare_workarounds #}
{% if 'post_overcloud_upgrade_prepare_workarounds' in item -%}
{% for bugs in post_overcloud_upgrade_prepare_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% elif 'pre_docker_converge_upgrade_workarounds' in item %}
{% for bugs in pre_docker_converge_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish post_overcloud_upgrade_prepare_workarounds #}
{% if 'pre_overcloud_upgrade_workarounds' in item -%}
{% for bugs in pre_overcloud_upgrade_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% elif 'post_docker_converge_upgrade_workarounds' in item %}
{% for bugs in post_docker_converge_upgrade_workarounds|default([]) %}
{% for key, value in bugs.items() %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish pre_overcloud_upgrade_workarounds #}
{% if 'post_overcloud_upgrade_workarounds' in item -%}
{% for bugs in post_overcloud_upgrade_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch %}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else %}
{% else -%}
{{ value.command }}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish post_overcloud_upgrade_workarounds #}
{% if 'pre_overcloud_upgrade_converge_workarounds' in item -%}
{% for bugs in pre_overcloud_upgrade_converge_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else -%}
{{ value.command }}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{% endif -%}
{# finish pre_overcloud_upgrade_converge_workarounds #}
{% if 'post_overcloud_upgrade_converge_workarounds' in item -%}
{% for bugs in post_overcloud_upgrade_converge_workarounds|default([]) -%}
{% for key, value in bugs.items() -%}
echo {{ key }}
{% if value.patch -%}
apply_patch {{ value.basedir }} {{ value.id }}
{% else -%}
{{ value.command }}
{% endif -%}
################################################################################
{% endfor -%}
{% endfor -%}
{# finish post_overcloud_upgrade_converge_workarounds #}
{% endif -%}