JSON size violation gives a bad error with nested templates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Rico Lin | ||
tempest |
Fix Released
|
Undecided
|
Rico Lin |
Bug Description
There is a 1048576 size limit to a template. In TripleO it might grow to be very big and might reach that limit but even a little bit below that limit I constantly his this error (the number 524288 seems constant no matter what size I use to test):
heatclient.
To create large templates I used this bash script (thanks Zane for the idea, sh is faster though):
#!/bin/sh
STRING=$(yes A | head -n $1 | tr -d "\n")
echo "heat_template_
resources:
huge:
type: OS::Heat:
properties: {config: $STRING}" > huge.yaml
Save to file and run it ./test.sh N (where N is the number of characters you add to a SoftwareConfig parameter).
To reach the limit of 1048576 characters you need to add 1048334 characters to config ^
parent.yaml:
heat_template_
resources:
huge:
type: Test::Test
env.yaml:
resource_registry:
Test::Test: file://
If we do this:
./test.sh 1048335 (one more from what we are allowed to use) and try to create a stack directly from huge.yaml:
ERROR: Request limit exceeded: JSON body size (1048578 bytes) exceeds maximum allowed size (1048576 bytes).
If we do the same with 1048334 (exactly 1048576 bytes) the stack is created normally.
To test the same with a nested template and to reach the size limit +1, set the number to 1048126 and run like so:
heat stack-create test-012 -f parent.yaml -e env.yaml
This gives the same error, but if I am exactly on limit or a little below that limit, I see this error (no matter the size I use):
heatclient.
tested on heat version 0.6.0
Changed in heat: | |
milestone: | none → mitaka-1 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in heat: | |
assignee: | nobody → Rico Lin (rico-lin) |
Changed in tempest: | |
assignee: | nobody → Rico Lin (rico-lin) |
Changed in heat: | |
milestone: | mitaka-1 → mitaka-2 |
no longer affects: | tempest |
Changed in tempest: | |
assignee: | nobody → Rico Lin (rico-lin) |
status: | New → In Progress |
Fix proposed to branch: master /review. openstack. org/252201
Review: https:/