Project

General

Profile

Bug #8883

zpool list parsable output is inconsistent

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

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

0%

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

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.

History

#1

Updated by Marcel Telka over 2 years ago

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

Updated by Yuri Pankov over 2 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.

Also available in: Atom PDF