Bug 1070225 - [RFE] Enhance lvs output when fields are invalid
Summary: [RFE] Enhance lvs output when fields are invalid
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-26 12:39 UTC by Zdenek Kabelac
Modified: 2023-08-02 02:20 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zdenek Kabelac 2014-02-26 12:39:13 UTC
Description of problem:

When lvs  finds invalid percentage output in snapshot, it could give much better output.  Here is an example of current output:

"lvm" lvs -a -o +devices >> "/tmp/lvmdump.pTiSOI/lvmdump-a/lvs" 2>> "/tmp/lvmdump.pTiSOI/lvmdump-a/lvmdump.log"
  Percentage too large.
  dm_report_object: report function failed for field data_percent

  LV          VG      Attr       LSize   Pool Origin Data%  Move Log Cpy%Sync Convert Devices       
  root        rhel    -wi-ao----  10.31g                                              /dev/vda2(307)                                                                                                                              
  swap        rhel    -wi-ao----   1.20g                                              /dev/vda2(0)  
  origin      snapper owi-a-s--- 300.00m                                              /dev/vdc1(0)  
  verify_snap snapper swi-a-s--- 100.00m      origin


It's not quite straightforward to see what went wrong and
also even some fields are missing because some previous field failed
(i.e. missing device list)

lvm2 should do a better job here.


Version-Release number of selected component (if applicable):
2.02.105

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Peter Rajnoha 2015-09-24 10:16:03 UTC
Looking at the condition when the "Percentage too large." is issued, the value must have had more than 7 characters, while 1 is reserved for the '\0' at the end of the string, 1 for the decimal point, 2 are reserved for tenths and hundredths and the rest for the integer part (3 digits). So the value must have been more than 999 for some reason, probably error case.

So if percentage is not in sane 0%-100% range for a field, we could just report DM_PERCENT_INVALID as raw value with "Invalid" keyword displayed probably...


Note You need to log in before you can comment on or make changes to this bug.