parameter_defaults only apply to nested stacks

Bug #1460063 reported by Dan Prince
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Confirmed
High
Unassigned

Bug Description

We are using parameter_defaults to define values for some nested stacks.

parameter_defaults:
  # Mapping of service_name -> network name.
  ServiceNetMap:
    NeutronLocalIp: tenant
    CeilometerApiNetwork: internal_api
   ..... lots more here ......

----

I recently tried to use the same data structure at the top level and discovered that anything in 'parameter_defaults' only applies to nested stacks... not the top level. I understand that is what the 'parameters' section is intended for... but I'd rather not duplicate this data structure into both the 'parameter_defaults' and 'parameters' sections of my environment in order to access them globally.

Tags: tripleo
Steven Hardy (shardy)
Changed in heat:
status: New → Triaged
importance: Undecided → High
tags: added: tripleo
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
Revision history for this message
Steven Hardy (shardy) wrote :

I think parameter_defaults should work for the top-level stack too, that it doesn't is probably an oversight given that the main focus was on nested stacks when it got implemented.

For now I guess something like a yaml reference between parameters and parameter_defaults in the environment may be a workaround?

I'll look into a fix.

Revision history for this message
Steven Hardy (shardy) wrote :

Hmm, so I've just tested with latest master and I can't currently reproduce this:

-bash-4.3$ cat parent.yaml
heat_template_version: 2013-05-23
parameters:
  foo:
    type: number
resources:
  random:
    type: OS::Heat::RandomString
    properties:
        length: {get_param: foo}

-bash-4.3$ cat env.yaml
parameter_defaults:
    foo: 3

heat stack-create p3 -f parent.yaml -e env.yaml

$ heat resource-show p3 random
+------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| attributes | { |
| | "value": "6FI" |
| | }

So, AFAICT this is working as required?

Changed in heat:
status: Triaged → Incomplete
Revision history for this message
Steven Hardy (shardy) wrote :

AFAIK this has now been proven to work, e.g https://review.gerrithub.io/#/c/243608/ so marking invalid.

Changed in heat:
status: Incomplete → Invalid
assignee: Steven Hardy (shardy) → nobody
importance: High → Undecided
Revision history for this message
Steven Hardy (shardy) wrote :

Turns out this is not invalid, but the problem only affects json and comma_delimited_list parameters:

https://review.openstack.org/#/c/234055/

Kudos to jistr for discovering this!

Changed in heat:
status: Invalid → Confirmed
importance: Undecided → High
Revision history for this message
Steven Hardy (shardy) wrote :

I'm going to close this a duplicate of 1504137 (even though that was reported later), because that's got a patch under review already, which I think we can work to resolve both issues (e.g fix both parameter types).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.