Merge "Move FFU validations to right playbook."
This commit is contained in:
commit
94a4712126
|
@ -12,6 +12,7 @@
|
||||||
{{ validation_args|default('') }} 2>&1 {{ timestamper_cmd }} >> validation-{{ validation_group }}.log
|
{{ validation_args|default('') }} 2>&1 {{ timestamper_cmd }} >> validation-{{ validation_group }}.log
|
||||||
args:
|
args:
|
||||||
executable: /usr/bin/bash
|
executable: /usr/bin/bash
|
||||||
|
rescue:
|
||||||
- name: Retrieve the validations results
|
- name: Retrieve the validations results
|
||||||
command: openstack tripleo validator show history -f json -c UUID -c Status
|
command: openstack tripleo validator show history -f json -c UUID -c Status
|
||||||
register: validation_history
|
register: validation_history
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
include_tasks: ../common/skip_rhel_enforcement.yaml
|
include_tasks: ../common/skip_rhel_enforcement.yaml
|
||||||
when: not ( enforce_rhel|bool )
|
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
|
- name: create undercloud upgrade script
|
||||||
template:
|
template:
|
||||||
src: "undercloud_upgrade.sh.j2"
|
src: "undercloud_upgrade.sh.j2"
|
||||||
|
|
|
@ -17,6 +17,28 @@
|
||||||
executable: /usr/bin/bash
|
executable: /usr/bin/bash
|
||||||
when: ffu_upgrade_workarounds|bool
|
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
|
- name: Clean up httpd folder
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -127,6 +149,20 @@
|
||||||
when: ffu_upgrade_workarounds|bool
|
when: ffu_upgrade_workarounds|bool
|
||||||
tags: ffu_overcloud_prepare
|
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
|
- name: convert nic templates
|
||||||
import_tasks: ../common/convert_nic_templates.yaml
|
import_tasks: ../common/convert_nic_templates.yaml
|
||||||
tags: ffu_overcloud_prepare
|
tags: ffu_overcloud_prepare
|
||||||
|
|
|
@ -3,13 +3,6 @@
|
||||||
include_tasks: ../common/skip_rhel_enforcement.yaml
|
include_tasks: ../common/skip_rhel_enforcement.yaml
|
||||||
when: not ( enforce_rhel|bool )
|
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
|
- name: create undercloud upgrade script
|
||||||
template:
|
template:
|
||||||
src: "undercloud_upgrade.sh.j2"
|
src: "undercloud_upgrade.sh.j2"
|
||||||
|
|
|
@ -20,16 +20,6 @@
|
||||||
chdir: "{{ working_dir }}"
|
chdir: "{{ working_dir }}"
|
||||||
when: upgrade_workarounds|bool
|
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
|
- name: Upgrade operating system
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -109,20 +99,6 @@
|
||||||
when: upgrade_workarounds
|
when: upgrade_workarounds
|
||||||
tags: overcloud_upgrade_prepare
|
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
|
- import_tasks: overcloud_upgrade_prepare.yml
|
||||||
tags: overcloud_upgrade_prepare
|
tags: overcloud_upgrade_prepare
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue