Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1482477 - Null values are not handled correctly when dumping data to file with tripleo-ansible-inventory
Null values are not handled correctly when dumping data to file with tripleo-...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations (Show other bugs)
12.0 (Pike)
Unspecified Unspecified
medium Severity medium
: beta
: 12.0 (Pike)
Assigned To: Florian Fuchs
Honza Pokorny
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-17 07:26 EDT by Yurii Prokulevych
Modified: 2018-02-05 14:12 EST (History)
10 users (show)

See Also:
Fixed In Version: openstack-tripleo-validations-7.3.1-0.20170831052729.67faa39.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-13 16:53:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1701239 None None None 2017-10-03 10:06 EDT
OpenStack gerrit 495965 None None None 2017-10-03 10:09 EDT
Red Hat Product Errata RHEA-2017:3462 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-15 20:43:25 EST

  None (edit)
Description Yurii Prokulevych 2017-08-17 07:26:49 EDT
Description of problem:
-----------------------
Null values are not handled correctly, which leads to just key being dumped to the inventory file.

E.g: 
/usr/bin/tripleo-ansible-inventory --static-inventory oc-hosts
ansible -i oc-hosts Controllers -m ping -vv
Using /etc/ansible/ansible.cfg as config file
ERROR! Attempted to read "oc-hosts" as YAML: Syntax Error while loading YAML.

The error appears to have been in '/home/stack/oc-hosts': line 1, column 16, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

[aodh_evaluator:vars]
               ^ here

Attempted to read "oc-hosts" as ini file: oc-hosts:366: Expected key=value, got: cacert

Offending line: 
===============
[undercloud:vars]
...
auth_url = http://192.168.24.1:5000/
ansible_connection = local
--->cacert
undercloud_swift_url = http://192.168.24.1:8080/v1/AUTH_f83abc228845445dbc8cea361ee276ff
plan = overcloud

And when passing output through 'python -m json.tool':
======================================================
/usr/bin/tripleo-ansible-inventory --list | python -m json.tool
...
    "undercloud": {
        "hosts": [
            "localhost"
        ],
        "vars": {
            "ansible_connection": "local",
            "auth_url": "http://192.168.24.1:5000/",
            "cacert": null,
            "undercloud_swift_url": "http://192.168.24.1:8080/v1/AUTH_f83abc228845445dbc8cea361ee276ff",
            "username": "admin"
        }
...

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
openstack-tripleo-validations-7.2.1-0.20170807182119.1f60b6f.el7ost.noarch

How reproducible:
-----------------
So far 100%
Comment 2 Gaël Chamoulaud 2017-10-03 10:09:15 EDT
FYI, This issue was fixed in the openstack/tripleo-validations 7.3.0 upstream release [1].

[1] - https://review.openstack.org/#/c/495965/
Comment 3 Gaël Chamoulaud 2017-10-03 10:40:26 EDT
(In reply to Gaël Chamoulaud from comment #2)
> FYI, This issue was fixed in the openstack/tripleo-validations 7.3.0
> upstream release [1].
> 
> [1] - https://review.openstack.org/#/c/495965/

And this change was included into openstack-tripleo-validations-7.3.1-0.20170831052729.67faa39.el7ost build.
Comment 9 errata-xmlrpc 2017-12-13 16:53:35 EST
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, 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/RHEA-2017:3462

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