Validations are failling due to wrong static inventory

Bug #1701239 reported by Gael Chamoulaud on 2017-06-29
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Critical
Michele Baldessari

Bug Description

I am running validations using a static inventory generated by tripleo-ansible-inventory, all the validations are failling due to the cacert variable in this inventory which is not respecting the key=value format.

2017-06-29 10:44:11 | + ansible-playbook -i /home/stack/validations_static_inventory /usr/share/openstack-tripleo-validations/validations/undercloud-ram.yaml
2017-06-29 10:44:11 | ERROR! Attempted to read "/home/stack/validations_static_inventory" as YAML: Syntax Error while loading YAML.
2017-06-29 10:44:11 |
2017-06-29 10:44:11 |
2017-06-29 10:44:11 | The error appears to have been in '/home/stack/validations_static_inventory': line 2, column 1, but may
2017-06-29 10:44:11 | be elsewhere in the file depending on the exact syntax problem.
2017-06-29 10:44:11 |
2017-06-29 10:44:11 | The offending line appears to be:
2017-06-29 10:44:11 |
2017-06-29 10:44:11 | [undercloud]
2017-06-29 10:44:11 | localhost
2017-06-29 10:44:11 | ^ here
2017-06-29 10:44:11 |
2017-06-29 10:44:11 | Attempted to read "/home/stack/validations_static_inventory" as ini file: /home/stack/validations_static_inventory:11: Expected key=value, got: cacert

Here is the static inventory file:

[undercloud]
localhost

[undercloud:vars]
username = admin
project_name = admin
undercloud_service_list = ['openstack-nova-compute', 'openstack-nova-api', 'openstack-heat-engine', 'openstack-heat-api', 'openstack-ironic-conductor', 'openstack-ironic-api', 'openstack-swift-container', 'openstack-swift-object', 'openstack-zaqar', 'openstack-glance-api', 'openstack-mistral-engine', 'openstack-mistral-api.service', 'openstack-glance-api']
os_auth_token = gAAAAABZVNn7WWagf0fHA9j1iIYswJ_mSOZXn52Yf-qZzU1GFFqy_UzEryJmptB8M3JaBItSrVL0Y1e4_fziLNfBor5pH_oKqVSO5kG3QxnW2jYtZAQ3Dt2ocEEeTGhTW-7KklWDTJxz0A_ITF9isgZGJ0vDH0pl05LdvNygceJ6BLmizV4rt2M
auth_url = https://192.168.24.2:13000/
ansible_connection = local
cacert
undercloud_swift_url = https://192.168.24.2:13808/v1/AUTH_ab355edddba843deafef01bf520e8648
plan = overcloud

Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → pike-3
Emilien Macchi (emilienm) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in tripleo:
assignee: Florian Fuchs (flo-fuchs) → nobody
Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → queens-1
Michele Baldessari (michele) wrote :

Moving this to pike-rc1 as we need tripleo-ansible-inventory in minor updates and this empty cacert breaks everything

Changed in tripleo:
importance: Medium → Critical
status: Triaged → Confirmed
assignee: nobody → Michele Baldessari (michele)
milestone: queens-1 → pike-rc1

Fix proposed to branch: master
Review: https://review.openstack.org/495965

Changed in tripleo:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/495965
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=8a2022e8a567e1707049fc22f20eec6fe245d42e
Submitter: Jenkins
Branch: master

commit 8a2022e8a567e1707049fc22f20eec6fe245d42e
Author: Michele Baldessari <email address hidden>
Date: Mon Aug 21 21:14:00 2017 +0200

    Do not output empty variables in inventory

    Currently tripleo-ansible-inventory --static can create an invalid
    inventory file:
    The offending line appears to be:
    [undercloud]
    localhost
    ^ here

    Attempted to read "/home/stack/validations_static_inventory" as ini file: /home/stack/validations_static_inventory:11: Expected key=value, got: cacert

    The broken snippet can be:
    ...
    ansible_connection = local
    cacert
    undercloud_swift_url = https://192.168.24.2:13808/v1/AUTH_ab355edddba843deafef01bf520e8648
    ...

    We need to make sure that keys that have a 'None' dictionary do not
    break the inventory file.

    Change-Id: I009c7b52a4d1dabc3ceaad14a828f90ff3845b94
    Closes-Bug: #1701239

Changed in tripleo:
status: In Progress → Fix Released

This issue was fixed in the openstack/tripleo-validations 7.3.0 release.

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

Other bug subscribers