[sheepdog] [PATCH] collie: add command 'collie vdi reset' to reset a cloned VDI
levin li
levin108 at gmail.com
Wed Aug 29 09:43:53 CEST 2012
On 2012年08月29日 15:27, MORITA Kazutaka wrote:
> At Wed, 29 Aug 2012 15:18:12 +0800,
> levin li wrote:
>>
>> On 2012年08月29日 15:08, MORITA Kazutaka wrote:
>>> At Wed, 29 Aug 2012 13:57:57 +0800,
>>> levin li wrote:
>>>>
>>>> From: levin li <xingke.lwp at taobao.com>
>>>>
>>>> With this command, we can reset a cloned VDI to its initial state as
>>>> it's just cloned from a snapshot, the usage is simple:
>>>>
>>>> $ collie vdi reset cloned_vdi_name
>>>>
>>>> Signed-off-by: levin li <xingke.lwp at taobao.com>
>>>> ---
>>>> collie/collie.h | 1 +
>>>> collie/common.c | 35 ++++++++++++++++++++++++++++++
>>>> collie/vdi.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>> 3 files changed, 99 insertions(+), 0 deletions(-)
>>>
>>> What is the use case of this command? Isn't it enough to delete the
>>> vdi and recreate it from snapshots?
>>>
>>> Thanks,
>>>
>>> Kazutaka
>>>
>>
>> It does the same thing as we delete the VDI first and recreate it, but faster than
>> the combination of the two commands, we don't need to call lookup_vdi too many times,
>> and many operations of the VDI deletion can be saved with this command if we only
>> want to reset the VDI.
>
> How about generalizing the command to a rollback command like as
> follows?
>
> $ collie vdi rollback -s [snapshot tag/id]
>
> I guess it will help much more people than just reseting a clone image
> to the initial state.
>
> Thanks,
>
> Kazutaka
>
OK, I'll work on this patch to implement the rollback function.
thanks,
levin
More information about the sheepdog
mailing list