OSC plugin: Missing template gives unhelpful error
Bug #1570229 reported by
Steven Hardy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-heatclient |
Fix Committed
|
Medium
|
Paul Breaux |
Bug Description
$ openstack stack create patch_test_20363 -t patch_20363.yaml
ERROR: None
-bash-4.3$ cat patch_20363.yaml
cat: patch_20363.yaml: No such file or directory
Oops - I used the wrong template name, but it doesn't give a good error - it should work like the old client did and tell me what is wrong:
heat stack-create patch_test_20363 -f patch_20363.yaml
<urlopen error [Errno 2] No such file or directory: '/opt/stack/
Changed in python-heatclient: | |
assignee: | nobody → Paul Breaux (p-breaux) |
Changed in python-heatclient: | |
status: | New → Confirmed |
description: | updated |
Changed in python-heatclient: | |
status: | Confirmed → In Progress |
Changed in python-heatclient: | |
status: | In Progress → Fix Committed |
Changed in python-heatclient: | |
importance: | Undecided → Medium |
milestone: | none → 1.3.0 |
To post a comment you must log in.
Appears as though the culprit is here:
https:/ /github. com/openstack/ python- heatclient/ blob/master/ heatclient/ common/ template_ utils.py# L39
The initial call to 'get_template_ contents' raises this error if the file is not found, yet the exception is caught and the function is run again (expecting a template object this time), and a different exception is raised because a different path is taken. I'll implement a fix and submit it for review.