Introduce pre_workload_launch_workarounds

Sometimes when we restore from image_set we might need
to apply workaround after quiesce before workload launch.

Change-Id: Icda2e1512cd77c9418370267184022859dad7c3c
This commit is contained in:
Lukas Bezdicka 2023-08-09 14:32:44 +02:00
parent 738dde0f73
commit 60644767c6
2 changed files with 34 additions and 7 deletions

View File

@ -25,15 +25,36 @@
when: workload_launch_traffic|bool
tags: always
- name: launch workload
shell: |
set -o pipefail
{{ workload_launch_script }} {{(workload_launch_traffic|bool)|ternary("workload_traffic","")}} 2>&1 {{ timestamper_cmd }} >> workload_launch.log
args:
chdir: "{{ working_dir }}"
executable: /usr/bin/bash
- name: workload launch
when: workload_launch|bool
tags: always
block:
- name: create pre workload_launch workarounds
template:
src: workarounds.sh.j2
dest: "{{ working_dir }}/{{ item }}.sh"
mode: 0775
force: true
when: ffu_upgrade_workarounds|bool or updates_workarounds|bool
loop:
- 'pre_workload_launch_workarounds'
- name: apply pre workload_launch workarounds
shell: |
set -o pipefail
./pre_workload_launch_workarounds.sh 2>&1 {{ timestamper_cmd }} >> pre_workload_launch_workarounds.log
args:
chdir: "{{ working_dir }}"
executable: /usr/bin/bash
when: ffu_upgrade_workarounds|bool or updates_workarounds|bool
- name: launch workload
shell: |
set -o pipefail
{{ workload_launch_script }} {{(workload_launch_traffic|bool)|ternary("workload_traffic","")}} 2>&1 {{ timestamper_cmd }} >> workload_launch.log
args:
chdir: "{{ working_dir }}"
executable: /usr/bin/bash
- include_tasks: upgrade/main.yml
when: >

View File

@ -252,3 +252,9 @@ ansible_patch {{ key }}
{{ render_workarounds(post_ffu_overcloud_ceph_workarounds|default([]),'post_ffu_overcloud_ceph_workarounds') }}
{# finish post_ffu_overcloud_ceph_workarounds #}
{% endif -%}
{% if updates_workarounds|bool or ffu_upgrade_workarounds|bool -%}
# Render for pre_workload_launch_workarounds
{{ render_workarounds(pre_workload_launch_workarounds|default([]),'pre_workload_launch_workarounds') }}
{# finish pre_workload_launch_workarounds #}
{% endif -%}