kolla_toolbox module sometimes ignores errors and changes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
Medium
|
Mark Goddard | ||
Queens |
New
|
Medium
|
Unassigned | ||
Rocky |
New
|
Medium
|
Unassigned | ||
Stein |
Fix Committed
|
Medium
|
Mark Goddard | ||
Train |
Fix Released
|
Medium
|
Mark Goddard |
Bug Description
The kolla_toolbox Ansible module executes as-hoc ansible commands in the kolla_toolbox container, and parses the output to make it look as if ansible-playbook executed the command. Currently however, this module fails to catch failures of the underlying command, and also shows tasks as 'ok' when the underlying command was changed. This has been tested both before and after the upgrade to ansible 2.8.
I used the following playbook to test this:
---
- hosts: localhost
gather_facts: false
tasks:
- name: Test successful & unchanged
kolla_
msg: hi
register: result
- name: Assert result is successful
assert:
that: result is successful
- name: Assert result is not changed
assert:
that: result is not changed
- name: Test successful & changed
kolla_
echo hi
register: result
- name: Assert result is successful
assert:
that: result is successful
- name: Assert result is changed
assert:
that: result is changed
# NOTE: Currently fails.
ignore_
- name: Test unsuccessful
kolla_
foo
register: result
ignore_
- name: Assert result is failed
assert:
that: result is failed
# NOTE: Currently fails.
ignore_
- name: Test invalid module parameters
kolla_
foo: bar
register: result
ignore_
- name: Assert result is failed
assert:
that: result is failed
# NOTE: Currently fails.
ignore_
Changed in kolla-ansible: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. opendev. org/682340
Review: https:/