Project

General

Profile

Feature #1163

zpool destroy should prompt user

Added by Roy Sigurd Karlsbakk about 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
2011-06-29
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

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

History

#1

Updated by sham pavman about 9 years ago

  • Assignee set to sham pavman

I have the fix for this.. So assigned it to myself.

#2

Updated by Yuri Pankov about 9 years ago

We will need the 'force' flag then so zpool/zfs commands would still be usable for scripting.

#3

Updated by sham pavman about 9 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.

#4

Updated by Garrett D'Amore about 9 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.

#5

Updated by Roy Sigurd Karlsbakk about 9 years ago

I guess I'll better throw in the towel here. You're right, it'll break scripting.

roy

#6

Updated by Yuri Pankov about 9 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.

#7

Updated by sham pavman about 9 years ago

we should go ahead and close this issue then..

Thanks

Also available in: Atom PDF