[
https://issues.apache.org/jira/browse/CLOUDSTACK-3305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Abhinandan Prateek updated CLOUDSTACK-3305:
-------------------------------------------
Issue Type: Improvement (was: Bug)
> TemplateSync Deletes the templates in creation state from Seconday storage.
> ---------------------------------------------------------------------------
>
> Key: CLOUDSTACK-3305
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3305
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.2.0
> Reporter: Nitin Mehta
> Fix For: 4.2.0
>
>
> this is what is happening.
> 1. Template creation from snapshot triggered. Work going on, but there is no
> update in DB that there is Work in Progress (//TODO Fix this Long term by
> putting an intermediate state)
> 2. Work gets complete and the agent returns back. We dont update the DB and
> send a computechecksum command to SSVM. (//TODO Long term - The create
> template itself should return the checksum - fix needed at ssvm for vmware
> and at citrix/libvrt resourcebase for XS and KVM)
> 3. Template sync gets triggered (because of unhealthy ssvm connecting back
> and forth with MS) and reports this template to the MS being on secondary
> storage, but we have no record that WIP in DB. So template sync deletes the
> template on SS. (//TODO short term - Should we be aggressive to delete the
> template or just sending an alert is fine ? Or if we can just relax and maybe
> delete in the next run or do more checking ?)
> 4. Compute checksum returns and DB is updated that a template is created and
> put into Ready status, but underlying it go deleted.
> For now I have changed the compute checksum logic after updating the DB that
> template is created. See the commit above for more information. BUT, this
> doesnt completely eliminate the race condition. There would still be a window
> where before updating the DB sync mechanism deletes the template (I think
> this should happen rarely),
> I can also make the fix possible in #3 (//TODO short term - Should we be
> aggressive to delete the template or just sending an alert is fine)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira