[openstack-dev] [heat] Stack update and raw_template backup
    Zane Bitter 
    zbitter at redhat.com
       
    Mon Jul 28 14:25:24 UTC 2014
    
    
  
On 26/07/14 00:04, Anant Patil wrote:
> Hi,
>
> When we do a stack update, I see that there are 2 copies of raw_template
> stored in database for each update. For n updates there are "2n + 1"
> entries of raw_template in database. Is this expected or is it a bug?
> When I dug more into it, I see that the deep copy of template is not
> copying the template.id resulting in it being stored when we do
> backup_stack.store and new_stack.store.
It's expected that we store 2 new templates, but the fact that we are 
not deleting the backup stack's template and the stack's old template 
after a successful update is a bug.
> Ideally, we should be keeping one copy of old template when the stack is
> updated. With this we have the history of templates updated over time.
With the changes that I made a few weeks ago, we now modify the existing 
template during an update, so we wouldn't really have the history anyway.
> 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.
cheers,
Zane.
    
    
More information about the OpenStack-dev
mailing list