get_failed_containers() filters fails in check mode

Bug #1871397 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Emilien Macchi

Bug Description

If Ansible is run in check mode, the async_results items will not contain failed or finished keys, Ansible will fail:

TASK [tripleo-container-manage : Show all container commands for /var/lib/tripleo-config/container-startup-config/step_1] *****************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'all_containers_commands' is undefined\n\nThe error appears to be in '/usr/share/ansible/roles/tripleo-container-manage/tasks/main.yml': line 92, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n include_tasks: create.yml\n - name: \"Show all container commands for {{ tripleo_container_manage_config }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/718119

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/718119
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=bc25dd663e482bc9608b2251f319daa0a32f7e87
Submitter: Zuul
Branch: master

commit bc25dd663e482bc9608b2251f319daa0a32f7e87
Author: Emilien Macchi <email address hidden>
Date: Tue Apr 7 10:15:41 2020 -0400

    Relax get_failed_containers() filter

    When Ansible is run in check mode, the async_results are missing some
    keys from regular runs, so we can't really tell if the container has
    finished and failed; let's just skip it.

    Closes-Bug: #1871397
    Change-Id: I5f99c8e5392326fc8274ca3278966cddd49e0c3d

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/718281

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/train)

Reviewed: https://review.opendev.org/718281
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=40d5adce699f2cb9fb2afa0ba96ce72269359a5c
Submitter: Zuul
Branch: stable/train

commit 40d5adce699f2cb9fb2afa0ba96ce72269359a5c
Author: Emilien Macchi <email address hidden>
Date: Tue Apr 7 10:15:41 2020 -0400

    Relax get_failed_containers() filter

    When Ansible is run in check mode, the async_results are missing some
    keys from regular runs, so we can't really tell if the container has
    finished and failed; let's just skip it.

    Closes-Bug: #1871397
    Change-Id: I5f99c8e5392326fc8274ca3278966cddd49e0c3d
    (cherry picked from commit bc25dd663e482bc9608b2251f319daa0a32f7e87)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 0.5.0

This issue was fixed in the openstack/tripleo-ansible 0.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 1.3.0

This issue was fixed in the openstack/tripleo-ansible 1.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.