Comment 2 for bug 1599114

Revision history for this message
Lars Kellogg-Stedman (larsks) wrote :

There is another problem that is not addressed by the current review.

Start with this in a file named `parent.yaml`:

    heat_template_version: 2016-04-08

    description: Fluentd logging configuration

    parameters:
      ParamA:
        type: string
        default: "this is a test"

    resources:
      TopLevelResource:
        type: ./child-1.yaml

    outputs:
      role_data:
        value:
          config_settings:
            map_merge:
              - get_attr: [TopLevelResource, role_data, config_settings]

Place this in `child-1.yaml`:

    heat_template_version: 2016-04-08

    description: Fluentd logging configuration

    parameters:
      ParamA:
        type: string
        default: "this is a test"

    resources:
      IntermediateResource:
        type: ./child-2.yaml

    outputs:
      role_data:
        value:
          config_settings:
            map_merge:
              - get_attr: [IntermediateResource, role_data, config_settings]

Place this in `child-2.yaml`:

    heat_template_version: 2016-04-08

    description: Fluentd logging configuration

    parameters:
      ParamA:
        type: string
        default: "this is a test"

Note that `child-2.yaml` stack has no outputs, although we ask for one
in the `child-1.yaml` stack.

Deploy a new stack from `parent.yaml`.

The stack will go to state `CREATE_COMPLETE`. Running `stack-show` on
this stack will reveal:

    [
      {
        "output_value": null,
        "output_error": "The Referenced Attribute (TopLevelResource role_data) is incorrect.",
        "output_key": "role_data",
        "description": "No description given"
      }
    ]

Note that the error is reported against `TopLevelResource`, even
though the actual problem is in the `child-2.yaml` stack. This makes
the error extremely hard to diagnose, especially in environments with
many nested stacks.