Project

General

Profile

Bug #6140

zpool(1M) needs better exit status codes

Added by Robert Mustacchi about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-08-19
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Right now, when one uses pool import, you can't distinguish between two important, but different issues:

  • A failure to import the pool itself
  • A failure to enable sharing on the pool (eg. enabling a sharesmb setting failed)

Because there's no good way to distinguish these from the error status, it makes it rather hard for service start up scripts to operate without resorting to doing something like checking if the pool was imported manually by a follow up zpool import to see if the pool import part of this was actually successful. If zpool(1M) could evolve independent exit status codes for these, that might help out here.

History

#1

Updated by Yuri Pankov about 5 years ago

Should the latter be treated as a failure at all, ie, we succeeded with importing the pool, so we shouldn't return anything other than 0.

Also available in: Atom PDF