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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/27/2014 10:47 AM, Raghavendra Talur wrote:
Inline.

----- Original Message -----
From: "Atin Mukherjee" <amukherj@xxxxxxxxxx>
To: "Sachin Pandit" <spandit@xxxxxxxxxx>, "Gluster Devel" <gluster-devel@xxxxxxxxxxx>, gluster-users@xxxxxxxxxxx
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@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@snapshot-24 glusterfs]#

Case 2: Delete all system snaps
[root@snapshot-24 glusterfs]# gluster snapshot delete all
Deleting <N> snaps stored on the system
Do you still want to continue? (y/n) y
[root@snapshot-24 glusterfs]#

Case 3: Delete all volume snaps
[root@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@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.


+1. This looks like a neat way to present appropriate warnings to users.

-Vijay

_______________________________________________
Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-users




[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux