tripleo-ansible-inventory won't show a traceback during exception handling

Bug #1751340 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Jill Rouleau

Bug Description

This exception handling in tripleo-ansible-inventory is too high level:

https://github.com/openstack/tripleo-validations/blob/master/scripts/tripleo-ansible-inventory#L146

The write_static_inventory function could raise any number of exceptions, such as a KeyError or IndexError. When this happens, there are not enough details in the error message produced by this exception handling to tell what the problem is.

At the very least, if we pass --debug to tripleo-ansible-inventory, it should print a traceback in this exception handling.

Even better would be to have some more detailed error reporting throughout the code.

Revision history for this message
James Slagle (james-slagle) wrote :
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → rocky-1
tags: added: config-download
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (master)

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

Changed in tripleo:
assignee: nobody → Jill Rouleau (jillrouleau)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.openstack.org/548074
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=5d30a5aa8e1510d169c042d25eff26658d96088c
Submitter: Zuul
Branch: master

commit 5d30a5aa8e1510d169c042d25eff26658d96088c
Author: Jill Rouleau <email address hidden>
Date: Mon Feb 26 10:38:12 2018 -0700

    Improve exceptions in tripleo-ansible-inventory

    Adds a debug flag to surface tracebacks on failures.
    Also removes .message from exceptions, as this is deprecated in 2.6
    and removed in py3.

    Change-Id: I7d2cdc37bd134370ff7edcefa3a4589024d5ce9a
    Closes-Bug: 1751340

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 9.0.0

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.