Bug 2000910

Summary: sysstat triggering automount [rhel-8.6.0]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: sysstatAssignee: Michal Sekletar <msekleta>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: fsumsal, libhe, linl, lmiksik, msekleta, rskvaril, shshang, xiliang, xxiong, yacao
Target Milestone: rcKeywords: CustomerScenariosInitiative, Regression, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sysstat-11.7.3-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1954793 Environment:
Last Closed: 2022-05-10 14:11:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1954793    
Bug Blocks:    

Comment 2 Michal Sekletar 2021-11-29 09:51:53 UTC
*** Bug 1797979 has been marked as a duplicate of this bug. ***

Comment 9 xxiong 2022-02-17 13:58:24 UTC
Seems issue still appear on the sysstat-11.7.3-7.el8

[root@bootp-73-131-186 os-tests]# rm -rf sa.new
[root@bootp-73-131-186 os-tests]# strace -fttT -o sadc.trc /usr/lib64/sa/sadc -F -L 1 2 sa.new
[root@bootp-73-131-186 os-tests]# grep mtab sadc.trc
318016 21:56:47.027742 openat(AT_FDCWD, "/etc/mtab", O_RDONLY) = 3 <0.000026>
[root@bootp-73-131-186 os-tests]# uname -r
4.18.0-365.el8.x86_64
[root@bootp-73-131-186 os-tests]#  rpm -q sysstat
sysstat-11.7.3-7.el8.x86_64
[root@bootp-73-131-186 os-tests]#

Comment 10 Shaoyu Shang 2022-03-14 09:04:10 UTC
I can still see this issue in RHEL-8.6.0-20220312.3-x86_64-dvd1.iso

[root@shshang-rhel8 ~]# rm -rf sa.new ; strace -fttT -o sadc.trc /usr/lib64/sa/sadc -F -L 1 2 sa.new ; grep mtab sadc.trc
16188 16:55:16.100156 openat(AT_FDCWD, "/etc/mtab", O_RDONLY) = 3 <0.000079>
[root@shshang-rhel8 ~]# uname -r
4.18.0-372.el8.x86_64
[root@shshang-rhel8 ~]# rpm -q sysstat
sysstat-11.7.3-7.el8.x86_64

Comment 11 Frantisek Sumsal 2022-03-14 10:33:14 UTC
IIUC, reading /etc/mtab is fine, the original issue is about calling statfs() on the autofs handle, thus triggering the auto mount. CC'ing @msekleta for confirmation.

Comment 12 Frank Liang 2022-04-22 03:23:11 UTC
Here is test result from RHEL-9 and I do not find 1670060 changed the pass criteria.
I am adding needinfo to Michal.

[root@localhost ~]# uname -r
5.14.0-75.el9.x86_64
[root@localhost ~]# rm -rf sa.new ; strace -fttT -o sadc.trc /usr/lib64/sa/sadc -F -L 1 2 sa.new ; grep mtab sadc.trc
[root@localhost ~]# echo $?
1

Comment 13 libhe 2022-04-22 03:32:10 UTC
*** Bug 2077470 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2022-05-10 14:11:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (sysstat bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1892

Comment 16 Michal Sekletar 2022-09-02 14:11:58 UTC
(In reply to Frank Liang from comment #12)
> Here is test result from RHEL-9 and I do not find 1670060 changed the pass
> criteria.
> I am adding needinfo to Michal.
> 
> [root@localhost ~]# uname -r
> 5.14.0-75.el9.x86_64
> [root@localhost ~]# rm -rf sa.new ; strace -fttT -o sadc.trc
> /usr/lib64/sa/sadc -F -L 1 2 sa.new ; grep mtab sadc.trc
> [root@localhost ~]# echo $?
> 1

As mentioned previously reading mtab in of itself is not a problem. Issue was calling statvfs() on autofs filesystems which caused them to automount. This is now fixed and RHEL-9 contains this fix as well.