Merge "Move FFU validations to right playbook."

This commit is contained in:
Zuul 2021-05-03 10:05:23 +00:00 committed by Gerrit Code Review
commit 94a4712126
5 changed files with 44 additions and 31 deletions

View File

@ -12,6 +12,7 @@
{{ validation_args|default('') }} 2>&1 {{ timestamper_cmd }} >> validation-{{ validation_group }}.log
args:
executable: /usr/bin/bash
rescue:
- name: Retrieve the validations results
command: openstack tripleo validator show history -f json -c UUID -c Status
register: validation_history

View File

@ -3,6 +3,13 @@
include_tasks: ../common/skip_rhel_enforcement.yaml
when: not ( enforce_rhel|bool )
- name: create pre-upgrade validation script for old version
template:
src: "pre-upgrade-osp13-validation.sh.j2"
dest: "{{ working_dir }}/pre-upgrade-validation.sh"
mode: 0775
force: true
- name: create undercloud upgrade script
template:
src: "undercloud_upgrade.sh.j2"

View File

@ -17,6 +17,28 @@
executable: /usr/bin/bash
when: ffu_upgrade_workarounds|bool
# At this stage we are running the source OSP version (OSP13), which does not
# support the new tripleo-validations framework.
- name: run pre-upgrade validation before upgrading RHEL
shell: |
set -o pipefail
{{ working_dir }}/pre-upgrade-validation.sh 2>&1 {{ timestamper_cmd }} >> validation-pre-upgrade.log
when: run_validations|bool
tags:
- upgrades_validations
- name: Check that all validations succeeded
lineinfile:
path: "{{ working_dir }}/validation-pre-upgrade.log"
regexp: "^.*Failure! The validation failed for all hosts:.*$"
state: absent
check_mode: true
register: validation_results
failed_when: validation_results is changed
tags:
- upgrades_validations
when: run_validations|bool
- name: Clean up httpd folder
become: true
become_user: root
@ -127,6 +149,20 @@
when: ffu_upgrade_workarounds|bool
tags: ffu_overcloud_prepare
# At this stage, the Undercloud is in targe version and the overcloud
# in source version. Therefore we can use the tripleo-validation new
# framework, but it is required to pass the python-interpreter
- name: run pre-upgrade validation for the overcloud nodes
import_tasks: ../common/validation_group_run.yaml
vars:
validation_group: "pre-upgrade"
validation_allowed_groups: "{{ upgrades_validations_groups }}"
validation_args: "--python-interpreter /usr/libexec/platform-python"
when: run_validations|bool
tags:
- overcloud_upgrade_prepare
- upgrades_validations
- name: convert nic templates
import_tasks: ../common/convert_nic_templates.yaml
tags: ffu_overcloud_prepare

View File

@ -3,13 +3,6 @@
include_tasks: ../common/skip_rhel_enforcement.yaml
when: not ( enforce_rhel|bool )
- name: create pre-upgrade validation script for old version
template:
src: "pre-upgrade-osp13-validation.sh.j2"
dest: "{{ working_dir }}/pre-upgrade-validation.sh"
mode: 0775
force: true
- name: create undercloud upgrade script
template:
src: "undercloud_upgrade.sh.j2"

View File

@ -20,16 +20,6 @@
chdir: "{{ working_dir }}"
when: upgrade_workarounds|bool
# At this stage we are running the source OSP version (OSP13), which does not
# support the new tripleo-validations framework.
- name: run pre-upgrade validation before upgrading RHEL
shell: |
set -o pipefail
{{ working_dir }}/pre-upgrade-validation.sh 2>&1 {{ timestamper_cmd }} >> validation-pre-upgrade.log
when: run_validations|bool
tags:
- upgrades_validations
- name: Upgrade operating system
become: true
become_user: root
@ -109,20 +99,6 @@
when: upgrade_workarounds
tags: overcloud_upgrade_prepare
# At this stage, the Undercloud is in targe version and the overcloud
# in source version. Therefore we can use the tripleo-validation new
# framework, but it is required to pass the python-interpreter
- name: run pre-upgrade validation for the overcloud nodes
import_tasks: ../common/validation_group_run.yaml
vars:
validation_group: "pre-upgrade"
validation_allowed_groups: "{{ upgrades_validations_groups }}"
validation_args: "--python-interpreter /usr/libexec/platform-python"
when: run_validations|bool
tags:
- overcloud_upgrade_prepare
- upgrades_validations
- import_tasks: overcloud_upgrade_prepare.yml
tags: overcloud_upgrade_prepare