RandomString validation failure in provider template

Bug #1408035 reported by Tomas Sedovic on 2015-01-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat

Bug Description

Passing OS::Heat::RandomString as a property to a provider template fails validation, if the nested parameter has a length constraint.

Running (templates attached to launchpad) `heat stack-create test -f ~/main.yaml` shows this error:

ERROR: Failed to validate: Parameter 'random_string' is invalid: length (0) is out of range (min: 8, max: 10)

If I change `{get_attr: [rs, value]}` to `{get_resource: rs}` (these should be equivalent according to the documentation), the error is similar but with a different length value:

ERROR: Failed to validate: Parameter 'random_string' is invalid: length (2) is out of range (min: 8, max: 10)

This error was introduced with the "Do static template validation for nested stacks" commit: c31c34f8dfd0919bf46a975701c139073115debc.

Tomas Sedovic (tsedovic) wrote :
Tomas Sedovic (tsedovic) wrote :
Changed in tripleo:
status: New → Triaged
Tomas Sedovic (tsedovic) wrote :

This affects the "without-mergepy" templates in TripleO. See the f20 job failure here:


Ben Nemec (bnemec) on 2015-01-06
Changed in tripleo:
importance: Undecided → High
Steven Hardy (shardy) wrote :

I think this is a duplicate of the following bugs:


I've posted some patches which fix the problem in heat, they're not yet merged:


The problem is we introduced validation which checks the nested template is valid, but we don't want to validate the values at validation (pre-create) time, because indirect references to resources which haven't yet been created may provide invalid values.

A workaround would be to move the RandomString resource inside the nested template, but we should merge the fix to heat soon.

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

Other bug subscribers