Bug 1599516

Summary: [autofs] The log no longer print PID of automount process
Product: Red Hat Enterprise Linux 7 Reporter: Kun Wang <kunwan>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Kun Wang <kunwan>
Severity: low Docs Contact:
Priority: low    
Version: 7.6CC: kunwan, rhandlin, xifeng, xzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.0.7-100.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1689469 (view as bug list) Environment:
Last Closed: 2019-08-06 13:10:29 UTC Type: Bug
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:    
Bug Blocks: 1689469    
Attachments:
Description Flags
Patch - add NULL check in prepare_attempt_prefix()
none
Patch - update build info with systemd
none
Patch - use flags for startup boolean options
none
Patch - move close stdio descriptors to become_daemon()
none
Patch - add systemd service command line option none

Description Kun Wang 2018-07-10 01:53:09 UTC
Description of problem:

When testing autofs-5.0.7-92.el7, I found the PID of automount which is very useful for tracking issues no longer exists in the log.

Version-Release number of selected component (if applicable):
autofs-5.0.7-92.el7,

How reproducible:
always

Steps to Reproduce:
1.enable debug log in /etc/autofs.conf
2.start autofs service
3.check log

Actual results:
pid missing (ex:automount: mount_mount: mount(nfs): calling mount -t nfs4......)

Expected results:
print pid (ex:automount[11909]: mount_mount: mount(nfs): calling mount -t nfs4...)

Additional info:

Comment 4 Ian Kent 2018-12-11 02:40:55 UTC
Created attachment 1513230 [details]
Patch - add NULL check in prepare_attempt_prefix()

Not strictly related but I noticed the problem while working on this so I felt compelled to include it.

Comment 5 Ian Kent 2018-12-11 02:43:16 UTC
Created attachment 1513231 [details]
Patch - update build info with systemd

Not strictly related but it is a change to the systemd support code which is being updated in this bug.

Comment 6 Ian Kent 2018-12-11 02:45:25 UTC
Created attachment 1513232 [details]
Patch - use flags for startup boolean options

Comment 7 Ian Kent 2018-12-11 02:46:26 UTC
Created attachment 1513233 [details]
Patch - move close stdio descriptors to become_daemon()

Comment 8 Ian Kent 2018-12-11 02:47:24 UTC
Created attachment 1513234 [details]
Patch - add systemd service command line option

Comment 10 Kun Wang 2019-04-12 05:17:36 UTC
Verified based on below test result:

##########################################
# on unfixed version autofs-5.0.7-99.el7 #
##########################################

[01:13:12 root@ ~~]# cat /var/log/messages | grep "automount\[[0-9]\+\]"
:: [ 01:13:12 ] :: [   FAIL   ] :: Running 'cat /var/log/messages | grep "automount\[[0-9]\+\]" ' (Expected 0, got 1)

############################################################
# on fixed version autofs-5.0.7-100.el7 and later releases #
############################################################

Apr 12 01:16:24 hp-dl180g6-01 automount[3425]: dev_ioctl_send_ready: token = 3
Apr 12 01:16:24 hp-dl180g6-01 automount[3425]: mounted /root/lc1599516/lctest
:: [ 01:16:24 ] :: [   PASS   ] :: Running 'cat /var/log/messages | grep "automount\[[0-9]\+\]" ' (Expected 0, got 0)

Comment 12 errata-xmlrpc 2019-08-06 13:10:29 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, 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-2019:2250