The whole issue was there because if a user wants to track the original template from which the final template was created there was no way, but after the fix whatever NEW templates are used to create a instance volume->snapshot->volume->snapshot->template, the final template will always have the original id. I don't see a way to know the source template ids for existing volumes/templates. There may be deleted template/volumes and knowing the source template id may not be even useful in those cases. Also as you rightly mentioned volumes created from ISO will also have template_id as null. I am not sure if this can be actually done, if you have any suggestion kindly share.
From: Nitin Mehta Sent: Wednesday, January 09, 2013 5:21 PM To: Saksham Srivastava; Devdeep Singh Cc: cloudstack Subject: Re: Review Request: CLOUDSTACK-924: source_template_id set to NULL when a template is created from a snapshot Exactly, so this is not a full fledged fix. Do you have a plan in mind to take care of volumes already facing this issue ? Remember that the volumes created from ISO will also have template_id as null so I understand that this is a bit tricky. From: Saksham Srivastava <[email protected]<mailto:[email protected]>> Reply-To: Saksham Srivastava <[email protected]<mailto:[email protected]>> To: Devdeep Singh <[email protected]<mailto:[email protected]>> Cc: Saksham Srivastava <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, Nitin Mehta <[email protected]<mailto:[email protected]>> Subject: Re: Review Request: CLOUDSTACK-924: source_template_id set to NULL when a template is created from a snapshot This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8900/ On January 9th, 2013, 8:43 a.m., Nitin Mehta wrote: You need to take care of migration as well. Any thoughts on that ? The fix is only for the new volumes which are created from snapshots which were themselves created from volumes which have a non-null template id. In case of parent volume carrying a null template id, the subsequent volumes created from it will be having null template id. - saksham On January 9th, 2013, 7:29 a.m., saksham srivastava wrote: Review request for cloudstack and Devdeep Singh. By saksham srivastava. Updated Jan. 9, 2013, 7:29 a.m. Description Volumes created from snapshots misses the source template information.Fixed the issue with volumes now getting the template id. Testing Verified on local setup. from template1->instance->snapshot1->volume1->snapshot2->template2 template2 now has source template id. Bugs: CLOUDSTACK-924 Diffs * server/src/com/cloud/storage/StorageManagerImpl.java (96f299c) View Diff<https://reviews.apache.org/r/8900/diff/>
