Feature #1163
closedzpool destroy should prompt user
0%
Description
Hi all
Destroying a beadm will prompt the admin:
root@mime:~# beadm destroy oi-likewise Are you sure you want to destroy oi-likewise? This action cannot be undone (y/[n]):
In my opinion, changing zpool and perhaps zfs to do the same would be a jolly good idea....
roy
Updated by sham pavman almost 11 years ago
- Assignee set to sham pavman
I have the fix for this.. So assigned it to myself.
Updated by Yuri Pankov almost 11 years ago
We will need the 'force' flag then so zpool/zfs commands would still be usable for scripting.
Updated by sham pavman almost 11 years ago
Well on second thought do we really need this as a feature.
Reason being there are a lot of scripts that that currently are written to work with only "zpool destroy"/ "zfs destroy" [ without user interaction ].
There is a "very good" possibility that these might break a lot of tasks elsewhere.
Updated by Garrett D'Amore almost 11 years ago
THIS IS A TERRIBLE IDEA.
Zpool force avoids a bunch of checks. It should not be used just because you want to use scripting. Don't break the interface here.
This bug gets a heartfelt -1 in my opinion.
Commands should not need to prompt for verification. If you have permission to run these commands (e.g. as root), then you better know what you're doing.
Updated by Roy Sigurd Karlsbakk almost 11 years ago
I guess I'll better throw in the towel here. You're right, it'll break scripting.
roy
Updated by Yuri Pankov almost 11 years ago
Garrett D'Amore wrote:
THIS IS A TERRIBLE IDEA.
Zpool force avoids a bunch of checks. It should not be used just because you want to use scripting. Don't break the interface here.
I haven't said anything about existing 'force' behavior, what I meant is that we'll need an option to bypass interactive prompt if the feature was to be implemented.
Updated by sham pavman almost 11 years ago
we should go ahead and close this issue then..
Thanks