From dce6bee2f9e477fd53f01b76b8fad4c7ef79cf8b Mon Sep 17 00:00:00 2001 From: Marios Andreou Date: Thu, 8 Jul 2021 12:03:27 +0300 Subject: [PATCH] Moves undercloud upgrade introspection data migration to step 1 This moves the ironic introspection data migration from swift to dbase to step1 of upgrade_tasks. It was previously in step3 but that caused related-bug since mysql is down at that point. Needed by [1] to fix the failing undercloud-upgrade job. [1] https://review.opendev.org/c/openstack/tripleo-ci/+/793393 Related-Bug: 1934658 Change-Id: Ic68fbc91e538ebb101b67b2abb3e285a79d770ab --- deployment/undercloud/undercloud-upgrade.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deployment/undercloud/undercloud-upgrade.yaml b/deployment/undercloud/undercloud-upgrade.yaml index a9610f9611..6715b76d20 100644 --- a/deployment/undercloud/undercloud-upgrade.yaml +++ b/deployment/undercloud/undercloud-upgrade.yaml @@ -74,6 +74,17 @@ outputs: - step|int == 0 - ansible_facts['distribution_major_version'] is version('8', '>=') - dnf_module_list|length > 0 + - name: migrate existing introspection data + shell: > + {{ container_cli }} exec -u root ironic_inspector ironic-inspector-migrate-data + --from swift --to database --config-file /etc/ironic-inspector/inspector.conf + become: true + register: ironic_inspector_migrate_data_result + when: + - step|int == 1 + failed_when: + - ironic_inspector_migrate_data_result.rc is defined # do not fail in dry run mode + - ironic_inspector_migrate_data_result.rc not in [0, 125] # ignore if container not running - name: Special treatment for OpenvSwitch tripleo_ovs_upgrade: when: @@ -111,17 +122,6 @@ outputs: register: os_net_config_upgrade failed_when: os_net_config_upgrade.rc not in [0,2] changed_when: os_net_config_upgrade.rc == 2 - - name: migrate existing introspection data - shell: > - {{ container_cli }} exec -u root ironic_inspector ironic-inspector-migrate-data - --from swift --to database --config-file /etc/ironic-inspector/inspector.conf - become: true - register: ironic_inspector_migrate_data_result - when: - - step|int == 3 - failed_when: - - ironic_inspector_migrate_data_result.rc is defined # do not fail in dry run mode - - ironic_inspector_migrate_data_result.rc not in [0, 125] # ignore if container not running # Keepalived was removed and the VIPs are now deployed by # os-net-config. # When Keepalived is stopped, it brings down the VIPs which is