Bug 2213669

Summary: [regression] NFS junction fail to work in nfs-utils-2.5.4-19.el9
Product: Red Hat Enterprise Linux 9 Reporter: Yongcheng Yang <yoyang>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.3CC: jlayton, xzhou
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-2.5.4-20.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:55:53 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:

Description Yongcheng Yang 2023-06-08 23:39:08 UTC
Description of problem:
The nfs-utils junction support doesn't work due to the fix of Bug 2148353

Pass in nfs-utils-2.5.4-18.el9 https://beaker.engineering.redhat.com/jobs/7941942
Fail in nfs-utils-2.5.4-19.el9 https://beaker.engineering.redhat.com/jobs/7941943

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
# beaker job https://beaker.engineering.redhat.com/jobs/7941943 nfs-utils-2.5.4-19.el9
###
$ nfsref --type=nfs-basic add /mnt/testarea/junction fsqe-r6515-02.fs.lab.eng.bos.redhat.com /
nfsref: Failed to add NFS location metadata to /mnt/testarea/junction: FEDFS_ERR_IO
$ nfsref --type=nfs-basic lookup /mnt/testarea/junction
nfsref: /mnt/testarea/junction is not an nfs-basic junction


Expected results:
# beaker job https://beaker.engineering.redhat.com/jobs/7941942 nfs-utils-2.5.4-18.el9
###
$ nfsref --type=nfs-basic add /mnt/testarea/junction dell-per740-89.rhts.eng.pek2.redhat.com /
Created junction /mnt/testarea/junction
$ nfsref --type=nfs-basic lookup /mnt/testarea/junction
dell-per740-89.rhts.eng.pek2.redhat.com:/

	NFS port:	2049
	Valid for:	0
	Currency:	-1
	Flags:		varsub(false)
	GenFlags:	writable(false), going(false), split(true)
	TransFlags:	rdma(true)
	Class:		simul(0), handle(0), fileid(0)
	Class:		writever(0), change(0), readdir(0)
	Read:		rank(0), order(0)
	Write:		rank(0), order(0)



Additional info:

Comment 1 Steve Dickson 2023-08-07 20:52:40 UTC
Here is the problem

--      tmp = open(pathname, O_DIRECTORY);
-+      tmp = open(pathname, O_PATH|O_DIRECTORY);

I remove the O_PATH and everything started to
work... not clear as to way it needed in the
first place. 

I'm working on getting a scratch build.. I
get some goofy Python

Comment 2 Yongcheng Yang 2023-08-08 08:12:55 UTC
This issue has been fixed in nfs-utils-2.5.4-20.el9 now: https://beaker.engineering.redhat.com/jobs/8163907

Comment 3 Jeff Layton 2023-08-08 10:13:33 UTC
Looks like a reasonable fix. I think I only added O_PATH in order to make mountd's footprint lighter, but if the reproducer works without that, then it should be fine.

Comment 6 Yongcheng Yang 2023-08-09 05:48:29 UTC
No new issue found from the regression tests against nfs-utils-2.5.4-20.el9

Comment 8 errata-xmlrpc 2023-11-07 08:55:53 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 (nfs-utils 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-2023:6692