Project

General

Profile

Actions

Bug #8883

closed

zpool list parsable output is inconsistent

Added by Jorge Schrauwen about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2017-12-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

While working on a saltstack issue I noticed the following inconsistency:

[root@carbon /usbkey/salt/.dynmod/modules]# /usr/sbin/zpool list -H -o name,size,alloc,free,cap,frag,health data
data    1.81T    714G    1.11T    38%    12%    ONLINE
[root@carbon /usbkey/salt/.dynmod/modules]# /usr/sbin/zpool list -H -p -o name,size,alloc,free,cap,frag,health data
data    1992864825344    767076794368    1225788030976    38    12%    ONLINE

When enabling parsable output using -p the value of cap loses the % symbol, but the value for frag does not.
Either both should lose the % or both should keep it.


Related issues

Related to illumos gate - Feature #13678: Make zpool list -vp print individual vdev sizes parsable.ClosedMatt Fiddaman

Actions
Actions #1

Updated by Marcel Telka about 6 years ago

  • Subject changed from zpool list parsable outpit is unconsistant to zpool list parsable output is inconsistent
Actions #2

Updated by Yuri Pankov almost 6 years ago

The question is how the "percent" fields should be printed -- should it be "12" or "0.12" or something else, and if fixing this would break the scripts that are used to this inconsistency.

Actions #3

Updated by Matt Fiddaman over 2 years ago

  • Related to Feature #13678: Make zpool list -vp print individual vdev sizes parsable. added
Actions #4

Updated by Electric Monk over 2 years ago

  • Gerrit CR set to 1371
Actions #5

Updated by Dan McDonald over 2 years ago

See #13678 for testing notes.

Actions #6

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 3dfe801733ea71102fa4b1f79dddf16ee3ea546f

commit  3dfe801733ea71102fa4b1f79dddf16ee3ea546f
Author: Christer Ekholm <che@chrekh.se>
Date:   2021-05-13T04:23:20.000Z

    13678 Make zpool list -vp print individual vdev sizes parsable.
    8883 zpool list parsable output is inconsistent
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF