[openstack-dev] [heat] Stack update and raw_template backup

Anant Patil anant.patil at hp.com
Wed Aug 6 14:26:21 UTC 2014


On 30-Jul-14 23:24, Zane Bitter wrote:
> On 30/07/14 02:21, Anant Patil wrote:
>> On 28-Jul-14 22:37, Clint Byrum wrote:
>>> Excerpts from Zane Bitter's message of 2014-07-28 07:25:24 -0700:
>>>> On 26/07/14 00:04, Anant Patil wrote:
>>>>> When the stack is updated, a diff of updated template and current
>>>>> template can be stored to optimize database.  And perhaps Heat should
>>>>> have an API to retrieve this history of templates for inspection etc.
>>>>> when the stack admin needs it.
>>>>
>>>> If there's a demand for that feature we could implement it, but it
>>>> doesn't easily fall out of the current implementation any more.
>>>
>>> We are never going to do it even 1/10th as well as git. In fact we won't
>>> even do it 1/0th as well as CVS.
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>
>> Zane,
>> I am working the defect you had filed, which would clean up backup stack
>> along with the resources, templates and other data.
>>
>> However, I simply don't want to delete the templates for the same reason
>> as we don't hard-delete the stack. Anyone who deploys a stack and
>> updates it over time would want to view the the updates in the templates
>> for debugging or auditing reasons.
> 
> As I mentioned, and as Ton mentioned in another thread, the old 
> templates are useless for auditing (and to a large extent debugging) 
> because the update process turns them into Frankentemplates that don't 
> reflect either the old or the new template supplied by the user (though 
> they're much closer to the new than the old).
> 
> So if you don't delete them, then you don't end up with a copy of the 
> old template, you end up with a broken copy of the new template.
> 
>> It is not fair to assume that every
>> user has a VCS with him to store the templates.
> 
> It most certainly is fair to assume that.
> 
> In addition, Glance has an artifact repository project already underway 
> with the goal of providing versioned access to templates as part of 
> OpenStack.
> 
> It's likely that not all users are making use of a VCS, but if they're 
> not then I don't know why they bother using Heat. The whole point of the 
> project is to provide a way for people to describe their infrastructure 
> in a way that _can_ be managed in a VCS. Whenever we add new features, 
> we always try to do so in a way that _encourages_ users to store their 
> templates in a VCS and _discourages_ them from managing them in an ad 
> hoc manner.
> 
>> It is kind of
>> inconvenience for me to not have the ability to view my updates in
>> templates.
> 
> I tend to agree that it would be kind-of nice to have, but you're 
> talking about it as if it's a simple matter of just not deleting the old 
> template and sticking an API in front of it, rather than the major new 
> development that it actually is.
> 
>> We need not go as far as git or any VCS. Any library which can do a diff
>> and patch of text files can be used, like the google-diff-match-patch.
> 
> We don't store the original text of templates - in heat-engine we only 
> get the object tree obtained by parsing the JSON or YAML. So the 
> templates we store or could store currently are of not much use to 
> (human) users.
> 
> cheers,
> Zane.
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 

Sorry for coming late on this.

Thanks Zane for clarifications.

However,
> I tend to agree that it would be kind-of nice to have, but you're
> talking about it as if it's a simple matter of just not deleting the
> old template and sticking an API in front of it, rather than the major
> new development that it actually is.
I am not really saying that it would be that easy. The how part will
come later. I am discussing this in the context of bug I am fixing but
certainly it's not that simple.

The templates, resources, events etc are all integral part of stack. I
would like to just grab the heat command to view all the stack and its
updates and templates. May be I should try to put it in a blueprint so
that the idea is clear and we can discuss.

- Anant



More information about the OpenStack-dev mailing list