Comment 7 for bug 1291905

Revision history for this message
Ladislav Smola (lsmola) wrote : Re: heat stack-update fails on timeout

Zane:
Np. Would be nice to put the feedback of the template to some tripleo bug. I didn't know it is doing something hacky. :-)

About the bug:
I tried to investigate how to do a quick workaround for Icehouse, but I don't see any trivial solution.

so I tried:

load resource directly from db using resource_get_by_name_and_stack(cnxt, resource_name, s.id) here: https://github.com/openstack/heat/blob/fe8f7f1b80953a671e52dc0e07d61269a6818f53/heat/engine/service.py#L960

so the existence check is easy, but then I need to initialize the resource.Resource so I can call metadata_update here:
https://github.com/openstack/heat/blob/fe8f7f1b80953a671e52dc0e07d61269a6818f53/heat/engine/service.py#L965

I didn't find a way how to do it, cause seems like Resource init needs the template data, which I don't have (example here:
https://github.com/openstack/heat/blob/fe8f7f1b80953a671e52dc0e07d61269a6818f53/heat/engine/parser.py#L117)

So I see 2 possible ways how to solve this:
1. resource will store enough info in the db, so you can initialize it just using the db record
2. current stack will save also updated_template, so it is accessible in this method

Both ^ are non-trivial architecture changes, so I am not sure if it is the right way. Did you have some easier hack in mind? Since the db record doesn't have even the resource_type, I can't see any easy hack.

Please, if you have some quick solution in mind, it would be nice if you could do it. Or if you point me, I can try to fix this next week (we have big planning this week so I can't probably do anything :-( )