diff --git a/nfs-utils-2.5.1-nfsiostat-KeyError.patch b/nfs-utils-2.5.1-nfsiostat-KeyError.patch new file mode 100644 index 0000000..a81d127 --- /dev/null +++ b/nfs-utils-2.5.1-nfsiostat-KeyError.patch @@ -0,0 +1,37 @@ +diff -up nfs-utils-2.5.1/tools/mountstats/mountstats.py.orig nfs-utils-2.5.1/tools/mountstats/mountstats.py +--- nfs-utils-2.5.1/tools/mountstats/mountstats.py.orig 2020-09-08 10:59:58.289384682 -0400 ++++ nfs-utils-2.5.1/tools/mountstats/mountstats.py 2020-09-08 14:02:05.560514346 -0400 +@@ -951,10 +951,11 @@ def print_iostat_summary(old, new, devic + if not old or device not in old: + stats.display_iostats(time) + else: +- old_stats = DeviceData() +- old_stats.parse_stats(old[device]) +- diff_stats = stats.compare_iostats(old_stats) +- diff_stats.display_iostats(time) ++ if ("fstype autofs" not in str(old[device])) and ("fstype autofs" not in str(new[device])): ++ old_stats = DeviceData() ++ old_stats.parse_stats(old[device]) ++ diff_stats = stats.compare_iostats(old_stats) ++ diff_stats.display_iostats(time) + + def iostat_command(args): + """iostat-like command for NFS mount points +diff -up nfs-utils-2.5.1/tools/nfs-iostat/nfs-iostat.py.orig nfs-utils-2.5.1/tools/nfs-iostat/nfs-iostat.py +--- nfs-utils-2.5.1/tools/nfs-iostat/nfs-iostat.py.orig 2020-09-08 10:59:58.286384653 -0400 ++++ nfs-utils-2.5.1/tools/nfs-iostat/nfs-iostat.py 2020-09-08 14:02:05.560514346 -0400 +@@ -470,10 +470,13 @@ def parse_stats_file(filename): + def print_iostat_summary(old, new, devices, time, options): + stats = {} + diff_stats = {} ++ devicelist = [] + if old: + # Trim device list to only include intersection of old and new data, + # this addresses umounts due to autofs mountpoints +- devicelist = [x for x in old if x in devices] ++ for device in devices: ++ if "fstype autofs" not in str(old[device]): ++ devicelist.append(device) + else: + devicelist = devices + diff --git a/nfs-utils.spec b/nfs-utils.spec index 79bd471..4e5f591 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -18,6 +18,7 @@ Source6: nfs-convert.service Patch001: nfs-utils-2.5.2-rc4.patch Patch002: nfs-utils-2.5.1-rpcidmap-dontfreeconfig.patch +Patch003: nfs-utils-2.5.1-nfsiostat-KeyError.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -368,6 +369,7 @@ fi %changelog * Tue Sep 08 2020 Steve Dickson 2.5.2-4.rc4 - rpc.idmapd: Do not free config variables (bz 1873965) +- nfsiostat: Drop autofs entries before calling compare_iostats() * Mon Aug 31 2020 Steve Dickson 2.5.2-3.rc4 - Fixed rpc.gssd: munmap_chunk(): invalid pointer