Scenario (occurred with a deep/large stack):
1. Create stack. In the failure scenario, the template was 3 levels nested.
2. Abandon stack. In the failure scenario, the size of the abandon JSON was more than 1.5MB.
3. Adopt stack. Note that because of the large abandon JSON, max_json_body_size in /etc/heat/heat.conf needed to be increased. Then failure:
ERROR: Invalid adopt data: The template is not a JSON object or YAML mapping.
The problem with the abondon JSON was that the top-most map in the abandon JSON was encoded as a "Field-Value" list (all other maps were correctly encoded as JSON dictionaries):
Scenario (occurred with a deep/large stack):
1. Create stack. In the failure scenario, the template was 3 levels nested.
2. Abandon stack. In the failure scenario, the size of the abandon JSON was more than 1.5MB.
3. Adopt stack. Note that because of the large abandon JSON, max_json_body_size in /etc/heat/heat.conf needed to be increased. Then failure:
ERROR: Invalid adopt data: The template is not a JSON object or YAML mapping.
The problem with the abondon JSON was that the top-most map in the abandon JSON was encoded as a "Field-Value" list (all other maps were correctly encoded as JSON dictionaries):
[
"common_ resources" : {
"action" : "CREATE",
"environment" : {
" encrypted_ param_names" : [],
. ..
{
"Field": "files",
"Value": {
"...": "...",
...
}
},
{
"Field": "status",
"Value": "COMPLETE"
},
...
{
"Field": "template",
"Value": {
},
...
{
"Field": "resources",
"Value": {
}
...
},
...
}
}
]
After converting the "Field-Value" list into a dictionary helped stack adopt succeeded.