[Gluster-users] [Gluster-devel] Need clarification regarding the "force" option for snapshot delete.

Raghavendra Bhat rabhat at redhat.com
Tue Jul 1 06:48:17 UTC 2014


On Friday 27 June 2014 10:47 AM, Raghavendra Talur wrote:
> Inline.
>
> ----- Original Message -----
> From: "Atin Mukherjee" <amukherj at redhat.com>
> To: "Sachin Pandit" <spandit at redhat.com>, "Gluster Devel" <gluster-devel at gluster.org>, gluster-users at gluster.org
> Sent: Thursday, June 26, 2014 3:30:31 PM
> Subject: Re: [Gluster-devel] Need clarification regarding the "force" option for snapshot delete.
>
>
>
> On 06/26/2014 01:58 PM, Sachin Pandit wrote:
>> Hi all,
>>
>> We had some concern regarding the snapshot delete "force" option,
>> That is the reason why we thought of getting advice from everyone out here.
>>
>> Currently when we give "gluster snapshot delete <snapname>", It gives a notification
>> saying that "mentioned snapshot will be deleted, Do you still want to continue (y/n)?".
>> As soon as he presses "y" it will delete the snapshot.
>>
>> Our new proposal is, When a user issues snapshot delete command "without force"
>> then the user should be given a notification saying to use "force" option to
>> delete the snap.
> In that case "gluster snapshot delete <snapname>" becomes useless apart
> from throwing a notification. If we can ensure snapshot delete all works
> only with "force" option then we can have gluster snapshot delete
> <volname> to work as it is now.
>
> ~Atin
>
> Agree with Atin here, asking user to execute same command with force appended is
> not right.
>
>
>> When snapshot delete command is issued with "force" option then the user should
>> be given a notification saying "Mentioned snapshot will be deleted, Do you still
>> want to continue (y/n)".
>>
>> The reason we thought of bringing this up is because we have planned to introduce
>> a command "gluster snapshot delete all" which deletes all the snapshot in a system,
>> and "gluster snapshot delete volume <volname>" which deletes all the snapshots in
>> the mentioned volume. If user accidentally issues any one of the above mentioned
>> command and press "y" then he might lose few or more snapshot present in volume/system.
>> (Thinking it will ask for notification for each delete).
> It will be good to have this feature, asking for y for every delete.
> When force is used we don't ask confirmation for each. Similar to rm -f.
>
> If that is not feasible as of now, is something like this better?
>
> Case 1 : Single snap
> [root at snapshot-24 glusterfs]# gluster snapshot delete snap1
> Deleting snap will erase all the information about the snap.
> Do you still want to continue? (y/n) y
> [root at snapshot-24 glusterfs]#
>
> Case 2: Delete all system snaps
> [root at snapshot-24 glusterfs]# gluster snapshot delete all
> Deleting <N> snaps stored on the system
> Do you still want to continue? (y/n) y
> [root at snapshot-24 glusterfs]#
>
> Case 3: Delete all volume snaps
> [root at snapshot-24 glusterfs]# gluster snapshot delete volume volname
> Deleting <N> snaps for the volume volname
> Do you still want to continue? (y/n) y
> [root at snapshot-24 glusterfs]#
>
> Idea here being, if the Warnings to different commands are different
> then users may pause for  moment to read and check the message.
> We can even list the snaps to be deleted even if we don't ask for
> confirmation for each.
>
> Raghavendra Talur

Agree with Raghavendra Talur. It would be better to ask the user without 
force option. The above method suggested by Talur seems to be neat.

Regards,
Raghavendra Bhat

>> Do you think notification would be more than enough, or do we need to introduce
>> a "force" option ?
>>
>> ------------------------------------------------------------------------------
>> Current procedure:
>> ------------------
>>
>> [root at snapshot-24 glusterfs]# gluster snapshot delete snap1
>> Deleting snap will erase all the information about the snap.
>> Do you still want to continue? (y/n)
>>
>>
>> Proposed procedure:
>> -------------------
>>
>> [root at snapshot-24 glusterfs]# gluster snapshot delete snap1
>> Please use the force option to delete the snap.
>>
>> [root at snapshot-24 glusterfs]# gluster snapshot delete snap1 force
>> Deleting snap will erase all the information about the snap.
>> Do you still want to continue? (y/n)
>> ------------------------------------------------------------------------------
>>
>> We are looking forward for the feedback on this.
>>
>> Thanks,
>> Sachin Pandit.
>>
>> _______________________________________________
>> Gluster-devel mailing list
>> Gluster-devel at gluster.org
>> http://supercolony.gluster.org/mailman/listinfo/gluster-devel
>>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://supercolony.gluster.org/mailman/listinfo/gluster-devel
>




More information about the Gluster-users mailing list