Comment 0 for bug 1700752

Revision history for this message
Gábor Márton (gabor.marton) wrote :

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):

[
    {
        "Field": "files",
        "Value": {
            "...": "...",
            ...
         }
    },
    {
        "Field": "status",
        "Value": "COMPLETE"
    },
    ...
    {
        "Field": "template",
        "Value": {
    },
    ...
    {
        "Field": "resources",
        "Value": {
            "common_resources": {
                "action": "CREATE",
                "environment": {
                    "encrypted_param_names": [],
                    ...
                }
                ...
            },
            ...
        }
    }
]

After converting the "Field-Value" list into a dictionary helped stack adopt succeeded.