Dynamic inventory print dependency errors don't help
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Low
|
git-harry | ||
Icehouse |
Won't Fix
|
Low
|
git-harry | ||
Juno |
Fix Released
|
Low
|
Jesse Pretorius | ||
Trunk |
Fix Released
|
Low
|
git-harry |
Bug Description
When netaddr is not installed the import fails but nothing is printed. Not sure why it would be necessary anyway, just let the ImportError cause the script to exit.
# ansible-playbook -e/etc/
ERROR: Inventory script (inventory/
File "/root/
main()
File "/root/
_set_
File "/root/
netaddr.
NameError: global name 'netaddr' is not defined
Changed in openstack-ansible: | |
assignee: | nobody → git-harry (git-harry) |
Changed in openstack-ansible: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: icehouse-backport-potential juno-backport-potential |
Reviewed: https:/ /review. openstack. org/154498 /git.openstack. org/cgit/ stackforge/ os-ansible- deployment/ commit/ ?id=de32ddca574 150806c4dbb9a47 930b0b6d1196f0
Committed: https:/
Submitter: Jenkins
Branch: master
commit de32ddca5741508 06c4dbb9a47930b 0b6d1196f0
Author: git-harry <email address hidden>
Date: Tue Feb 10 14:33:14 2015 +0000
Remove ImportError handling in dynamic_inventory
The import of netaddr any yaml is done within a try/except block. If an
ImportError occurs an error message is printed and the script ignores
it. Ansible does not display the printed message and the script will
still fail, just later on.
This commit removes the exception handling so that if there is an
ImportError the script will fail straight away.
Change-Id: Iff935db62bde95 4ac4ff0b920409c 18dd494bdff
Closes-Bug: #1420312