Project

General

Profile

Actions

Feature #1163

closed

zpool destroy should prompt user

Added by Roy Sigurd Karlsbakk almost 10 years ago. Updated 3 months ago.

Status:
Closed
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

Actions #1

Updated by sham pavman almost 10 years ago

  • Assignee set to sham pavman

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

Actions #2

Updated by Yuri Pankov almost 10 years ago

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

Actions #3

Updated by sham pavman almost 10 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.

Actions #4

Updated by Garrett D'Amore almost 10 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.

Actions #5

Updated by Roy Sigurd Karlsbakk almost 10 years ago

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

roy

Actions #6

Updated by Yuri Pankov almost 10 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.

Actions #7

Updated by sham pavman almost 10 years ago

we should go ahead and close this issue then..

Thanks

Actions #8

Updated by Andy Fiddaman 3 months ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF