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 :-( )
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/ fe8f7f1b80953a6 71e52dc0e07d612 69a6818f53/ 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: /github. com/openstack/ heat/blob/ fe8f7f1b80953a6 71e52dc0e07d612 69a6818f53/ heat/engine/ service. py#L965
https:/
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: /github. com/openstack/ heat/blob/ fe8f7f1b80953a6 71e52dc0e07d612 69a6818f53/ heat/engine/ parser. py#L117)
https:/
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 :-( )