Project

General

Profile

Bug #2447

beadm should be more descriptive about some errors

Added by Jim Klimov over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
cmd - userland programs
Start date:
2012-03-23
Due date:
2012-07-24
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

beadm provides extended error diagnostics with a preset environment value "BE_PRINT_ERR=true", but that does not seem to be a very known feature. Some typical failures can remain inexplicable for an average user, examples follow:

1. Why won't it mount my BE like it did a lot of times before?

root@openindiana:~# beadm mount oi_151a /a
Unable to mount oi_151a.
(null)

Ah, some later-added datasets (children of new root) got automounted into say "/a/opt":

root@openindiana:~# BE_PRINT_ERR=true  beadm mount oi_151a /a
be_mount_root: failed to mount dataset rpool/ROOT/oi_151a at /a: directory is not empty
be_mount: failed to mount BE root file system
Unable to mount oi_151a.
(null)

The ZFS mounter error could be promoted to visibility in this case.

2. What could this be?

root@openindiana:~# beadm mount rpool/ROOT/openindiana2 /a
Unable to mount rpool/ROOT/openindiana2.
(null)

Ah, wrong usage - the be_mount error message could be promoted to visibility here:

root@openindiana:~# BE_PRINT_ERR=true  beadm mount rpool/ROOT/openindiana2 /a
be_mount: invalid BE name rpool/ROOT/openindiana2
Unable to mount rpool/ROOT/openindiana2.
(null)

Perhaps there are other similar issues, but these are some I've hit today ;)
Again, the proposed fix is about writing some informative messages instead of one-liners "Unable to...".

A secondary objective might be to add a documented verbosity command-line option to do the same outout as "BE_PRINT_ERR=true".

History

#1

Updated by Alexander Eremin over 8 years ago

  • Assignee set to Alexander Eremin
  • % Done changed from 0 to 20

be_mount just return "BE_ERR_INVAL" for these cases (but should different), which not processed in be_do_mount and prints just "Unable to mount", moreover, with wrong err.

#2

Updated by Alexander Eremin about 8 years ago

  • Due date set to 2012-07-24
  • Status changed from New to Pending RTI
  • % Done changed from 20 to 100
#3

Updated by Rich Lowe about 8 years ago

  • Category set to cmd - userland programs
  • Status changed from Pending RTI to Resolved
  • Tags deleted (needs-triage)

Resolved in r13755 commit:80fe82480d1e

Also available in: Atom PDF