Bug 1849003 - fact dicts returned are of type string rather than dict
Summary: fact dicts returned are of type string rather than dict
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.11.z
Assignee: Russell Teague
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 12:55 UTC by Andy Bartlett
Modified: 2024-06-13 22:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-03 12:27:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-ansible pull 12306 0 None closed Bug 1849003: [release-3.11] Fix string handling when setting facts 2021-02-17 06:07:18 UTC
Red Hat Product Errata RHSA-2021:0637 0 None None None 2021-03-03 12:29:08 UTC

Description Andy Bartlett 2020-06-19 12:55:44 UTC
Description of problem:

We are deploying the Openshift 3.11 cluster using the aws_ec2.yml dynamic inventory plugin. When logging is enabled the cluster build fails with the issue mentioned here: https://github.com/openshift/openshift-ansible/issues/11697. This issue is not encountered when an ini style inventory file is used so it is related to the aws_ec2 plugin. 
Doing a diff on output, when using a ini inventory vs aws_ec2 sheds some light on what's going wrong: 

2 of the fact dicts returned are of type string rather than dict. The logic in conditional_set_fact.py is expecting them to be of type dict and hence it blows up

Version-Release number of the following components:

####
Version-Release number of the following components:
openshift-ansible:  pointing at openshift-ansible-3.11.217-1 tag.
rpm -q ansible: ansible-2.8.12-1.el7ae.noarch
ansible --version: 
ansible 2.8.12
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
####

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
I found reference to a workaround in Case number: 02587009, which works by adding a dict:

"{{ hostvars[inventory_hostname] | to_json | from_json }}"

I can confirm this workaround worked for my customer but they would like a permanent fix for this rather than an unmanaged workaround.

Comment 4 Russell Teague 2021-02-03 16:07:47 UTC
Reopening to implement a fix.

Comment 7 Anping Li 2021-02-23 05:41:40 UTC
No, regression was found. move to verified. As I didn't tested via dynamic inventory. Feel free to re-open it if you still hit this issue.

Comment 11 errata-xmlrpc 2021-03-03 12:27:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 3.11.394 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:0637


Note You need to log in before you can comment on or make changes to this bug.