Bug 2225268 - Key error in nfsiostats in line "if "fstype autofs" not in str(old[device])"
Summary: Key error in nfsiostats in line "if "fstype autofs" not in str(old[device])"
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nfs-utils
Version: 8.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-24 20:19 UTC by Paulo Andrade
Modified: 2023-07-25 05:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-163199 0 None None None 2023-07-24 21:57:48 UTC

Description Paulo Andrade 2023-07-24 20:19:32 UTC
There is already a patch named nfs-utils-2.3.3-nfsiostat-key-error.patch
but it does not cover the issue found by user:

Traceback (most recent call last):
  File "/usr/sbin/nfsiostat", line 667, in <module>
    iostat_command(prog)
  File "/usr/sbin/nfsiostat", line 635, in iostat_command
    print_iostat_summary(old_mountstats, mountstats, devices, sample_time, options)
  File "/usr/sbin/nfsiostat", line 475, in print_iostat_summary
    if "fstype autofs" not in str(old[device]):
KeyError: '/home/someuser

  Untested, this pseudo patch should work:

-            if "fstype autofs" not in str(old[device]):
+            if device in old and "fstype autofs" not in str(old[device]):

  If this condition should not happen, please suggest a way to debug what did lead to it.


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