commit dac931018e2c20a84bd3dde92d78c0ce984cb581 Author: Sofer Athlan-Guyot Date: Tue Mar 10 12:26:37 2020 +0100 Use "is failed" instead of "|failed" filter. According to ansible documentation[1] the filter syntax shouldn't be used in test since 2.5. One of the strange outcome I've experienced is ceph update failure was undetected and the job would end up in timeout. Fix all the tests still using that idiom to the new one. [1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#test-syntax Change-Id: Ibee9655139c0b61ba04417ac39967d1f53793404 (cherry picked from commit c303d284037d71072be9d7e623b646f899b8b7d2) diff --git a/tasks/fast-forward-upgrade/ffu_update_stack_outputs.yaml b/tasks/fast-forward-upgrade/ffu_update_stack_outputs.yaml index 644f5e5..a6d1bff 100644 --- a/tasks/fast-forward-upgrade/ffu_update_stack_outputs.yaml +++ b/tasks/fast-forward-upgrade/ffu_update_stack_outputs.yaml @@ -13,7 +13,7 @@ source {{ undercloud_rc }} openstack stack failures list --long {{ overcloud_stack_name }} 2>&1 {{ timestamper_cmd }} | \ tee {{ working_dir }}/ffu_update_stack_outputs_failed.log - when: ffu_stack_output|failed + when: ffu_stack_output is failed - name: print resource list shell: | @@ -21,8 +21,8 @@ source {{ undercloud_rc }} openstack stack resource list --filter status=FAILED --nested-depth 5 {{ overcloud_stack_name }} 2>&1 {{ timestamper_cmd }} | \ tee {{ working_dir }}/ffu_update_stack_outputs_failed_resources.log - when: ffu_stack_output|failed + when: ffu_stack_output is failed - name: was the ffu update stack outputs successful. fail: msg="FFU update stack outputs step failed... :(" - when: ffu_stack_output|failed + when: ffu_stack_output is failed diff --git a/tasks/fast-forward-upgrade/ffu_upgrade_ceph.yaml b/tasks/fast-forward-upgrade/ffu_upgrade_ceph.yaml index 85357ac..83154c5 100644 --- a/tasks/fast-forward-upgrade/ffu_upgrade_ceph.yaml +++ b/tasks/fast-forward-upgrade/ffu_upgrade_ceph.yaml @@ -24,4 +24,4 @@ - name: was the ffu update ceph successful. fail: msg="FFU upgrade ceph step failed... :(" - when: ffu_upgrade_ceph|failed + when: ffu_upgrade_ceph is failed diff --git a/tasks/fast-forward-upgrade/ffu_upgrade_converge.yaml b/tasks/fast-forward-upgrade/ffu_upgrade_converge.yaml index b2c91a9..0be1891 100644 --- a/tasks/fast-forward-upgrade/ffu_upgrade_converge.yaml +++ b/tasks/fast-forward-upgrade/ffu_upgrade_converge.yaml @@ -13,7 +13,7 @@ source {{ undercloud_rc }} openstack stack failures list --long {{ overcloud_stack_name }} 2>&1 {{ timestamper_cmd }} | \ tee {{ working_dir }}/ffu_upgrade_converge_failed.log - when: ffu_converge|failed + when: ffu_converge is failed - name: print resource list shell: | @@ -21,8 +21,8 @@ source {{ undercloud_rc }} openstack stack resource list --filter status=FAILED --nested-depth 5 {{ overcloud_stack_name }} \ 2>&1 {{ timestamper_cmd }} | tee {{ working_dir }}/ffu_upgrade_converge_failed_resources.log - when: ffu_converge|failed + when: ffu_converge is failed - name: was the ffu converge successful. fail: msg="FFU converge step failed... :(" - when: ffu_converge|failed + when: ffu_converge is failed diff --git a/tasks/update/ceph_update_run.yml b/tasks/update/ceph_update_run.yml index cbb7d1f..a3934be 100644 --- a/tasks/update/ceph_update_run.yml +++ b/tasks/update/ceph_update_run.yml @@ -14,4 +14,4 @@ - name: fail Ceph update fail: msg: Ceph minor update failed - when: ceph_update_status|failed + when: ceph_update_status is failed diff --git a/tasks/upgrade/ceph_upgrade_run.yml b/tasks/upgrade/ceph_upgrade_run.yml index 69b8b3c..4c72617 100644 --- a/tasks/upgrade/ceph_upgrade_run.yml +++ b/tasks/upgrade/ceph_upgrade_run.yml @@ -14,4 +14,4 @@ - name: fail Ceph upgrade fail: msg: Ceph Upgrade Failed - when: ceph_upg_status|failed + when: ceph_upg_status is failed diff --git a/tasks/upgrade/undercloud_ssl_camap.yaml b/tasks/upgrade/undercloud_ssl_camap.yaml index 43c49f8..50ec477 100644 --- a/tasks/upgrade/undercloud_ssl_camap.yaml +++ b/tasks/upgrade/undercloud_ssl_camap.yaml @@ -97,4 +97,4 @@ scp -q -o StrictHostKeyChecking=no {{ working_dir }}/undercloud.pem {{ oc_user }}@{{ item }}: ssh -q -o StrictHostKeyChecking=no {{ oc_user }}@{{ item }} 'sudo cp undercloud.pem /etc/pki/ca-trust/source/anchors/; sudo update-ca-trust extract' loop: "{{ node_ip.stdout_lines }}" - when: uc_keystone_conn|failed + when: uc_keystone_conn is failed