Some output returns null by stack-show, but there's no log hinting what's wrong.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Triaged
|
Medium
|
Kent Wang |
Bug Description
1. create a stack with following template:
-------
heat_template_
description: create cinder volume
resources:
res123:
type: OS::Cinder::Volume
properties:
name: volname
size: 1
outputs:
voltype:
value: {get_attr: [res123, volume_type, test]}
-------
2. use stack-show to query stack details
The outputs part of details as following:
-------
| outputs | [ |
| | { |
| | "output_value": null, |
| | "description": "No description given", |
| | "output_key": "voltype" |
| | } |
| | ]
-------
The output_value null is no problem, cause "volume_type" attribute doesn't have key "test",
so select_
But there's no log recording exceptions in select_
-------
try:
return six.moves.
except (KeyError, IndexError, TypeError):
return None
-------
Users can't figure out what's going on if they configure path arguments for get_attr wrong by accident like above.
So I suggest adding exception log before return None while exception caught in select_
Changed in heat: | |
assignee: | nobody → Kent Wang (k.wang) |
Changed in heat: | |
milestone: | none → no-priority-tag-bugs |
some attributes only appear later in the lifecycle of the resource, so a missing key is not always an error.
Also logging an exception will only be visible to the cloud operator, which is of no use to the heat user.
Until there is a mechanism to send notifications to the user (which will eventually be possible via zaqar) I don't see an easy way of giving the user better feedback that they've mistyped an attribute.
Another possible improvement for those resources which have static attribute schemas (which is most of them) is to flag its attributes schema as strict then raise an error if an attempt is made to get an attribute not in the schema