commit 9d4dce3cea557c149dca98a2e1608ce73f42c1c8
Author: Tony Breeds <email address hidden>
Date: Tue Jan 8 20:58:21 2019 +1100
Do not dereference .stdout if dmidecode is missing
In 459b2664d99befa452e1946a4e4cf400183dd9e3 (Handle missing or bad
dmidecode) we accept return values of 0, 1 or 2 from command modules
that call 'dmidecode'. However we then unconditionally look at the
stdout key in the result object. When the dmidecode binary is missing
the result dictionary from the command module doesn't contain a stdout
key (resulting in something like):
---
fatal: [overcloud-novacomputeppc64le-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/var/lib/mistral/overcloud/ceph-ansible/nodes_uuid_playbook.yml': line 14, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n failed_when: machine_uuid.rc not in [0, 1, 2]\n - name: generate host vars from nodes data\n ^ here\n"}
---
This change just adds a default('') filter to the lookup so a missing
key will fallback to an empty dictionary
Closes-Bug: 1790447
Change-Id: I7db180674c3696508a7f449e2e825e7083a00f6e
(cherry picked from commit f9b5401c1f478084031543d8c9f016068935596b)
Reviewed: https:/ /review. openstack. org/629178 /git.openstack. org/cgit/ openstack/ tripleo- heat-templates/ commit/ ?id=9d4dce3cea5 57c149dca98a2e1 608ce73f42c1c8
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 9d4dce3cea557c1 49dca98a2e1608c e73f42c1c8
Author: Tony Breeds <email address hidden>
Date: Tue Jan 8 20:58:21 2019 +1100
Do not dereference .stdout if dmidecode is missing
In 459b2664d99befa 452e1946a4e4cf4 00183dd9e3 (Handle missing or bad
dmidecode) we accept return values of 0, 1 or 2 from command modules
that call 'dmidecode'. However we then unconditionally look at the
stdout key in the result object. When the dmidecode binary is missing
the result dictionary from the command module doesn't contain a stdout
key (resulting in something like):
--- novacomputeppc6 4le-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/var/lib/ mistral/ overcloud/ ceph-ansible/ nodes_uuid_ playbook. yml': line 14, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n failed_when: machine_uuid.rc not in [0, 1, 2]\n - name: generate host vars from nodes data\n ^ here\n"}
fatal: [overcloud-
---
This change just adds a default('') filter to the lookup so a missing
key will fallback to an empty dictionary
Closes-Bug: 1790447 508a7f449e2e825 e7083a00f6e 4031543d8c9f016 068935596b)
Change-Id: I7db180674c3696
(cherry picked from commit f9b5401c1f47808