We've had bug(s) about this before IIRC, but it's still not working correctly, see reproducer below where an output references a wrong parameter - the stack goes CREATE_COMPLETE, but then resolving the outputs fails.
This is more of a problem than it seems at first glance, because although the stack-show error output is pretty clear, it's not reflected clearly at all when this happens in a nested template - some parent resource that references the nested stack output randomly fails and you have to manually inspect the nested stack to see the cause of the error - it'd be *much* clearer and easier to debug if the nested stack just failed.
If it's not possible to validate this during the validate stage due to dependencies on runtime data (I suspect this may be the case), we should special-case this for TemplateResource such that we resolve all attributes/outputs before declaring the parent resource COMPLETE.
[stack@instack openstack-tripleo-heat-templates]$ cat /tmp/reproducer.yaml
heat_template_version: 2016-04-08
parameters:
SaharaWorkers:
default: 0
description: The number of workers for the sahara-api.
type: number
outputs:
role_data:
description: Role data for the Sahara API role.
value:
config_settings:
sahara::service::api::api_workers: {get_param: SaharaApiWorkers}
[stack@instack openstack-tripleo-heat-templates]$ heat stack-create r1 -f /tmp/reproducer.yaml
| 75d5a2bc-86e5-4551-8f88-4742d6a9f709 | r1 | CREATE_IN_PROGRESS | 2016-07-05T10:39:22 | None |
[stack@instack openstack-tripleo-heat-templates]$ heat stack-list
| 75d5a2bc-86e5-4551-8f88-4742d6a9f709 | r1 | CREATE_COMPLETE | 2016-07-05T10:39:22 | None |
[stack@instack openstack-tripleo-heat-templates]$ heat stack-show r1
...
| outputs | [ |
| | { |
| | "output_value": null, |
| | "output_error": "The Parameter (SaharaApiWorkers) was not provided.", |
| | "output_key": "role_data", |
| | "description": "Role data for the Sahara API role." |
| | }
Fix proposed to branch: master /review. openstack. org/342124
Review: https:/