Bug 1463004
| Summary: | Server availability probe broke tunneling nfs via localhost | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Sorenson <fsorenso> | |
| Component: | autofs | Assignee: | Ian Kent <ikent> | |
| Status: | CLOSED ERRATA | QA Contact: | xiaoli feng <xifeng> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | high | |||
| Version: | 6.9 | CC: | agilley, dwysocha, fsorenso, ikent, jiyin, jkurik, rhandlin, swhiteho, xzhou | |
| Target Milestone: | rc | Keywords: | Patch, Regression | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | autofs-5.0.5-135.el6 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1598640 (view as bug list) | Environment: | ||
| Last Closed: | 2018-06-19 05:22:12 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: | 1461138, 1507140, 1598640 | |||
| Attachments: | ||||
Right, I see, I'll sort this out. Thanks for the comprehensive problem description. Ian I see from the case the customer has had some difficulty getting us to understand the problem. Please offer my apologies to them and let them know I do understand the problem (thanks to your description Frank) and I'll try to resolve it as soon as I can. Checking availability in this case does introduce some additional difficulties which I need to work out how to deal with because we do need this functionality. I'm not sure how it happened but mount.nfs(8) changed at some point which is what lead to the check being introduced so there may have been problems without the autofs change also. And regarding the autofs_use_lofs configuration option. In the comments in the configuration file that is installed, and above a rather lengthy set of descriptions there is this: # Otions for the amd parser within autofs. Apart from the spelling mistake, I understand it's easy to miss that autofs_use_lofs is an amd format map configuration option not an autofs (Sun) map format option. It's also listed as an amd option in autofs.conf(5). So it doesn't relate to what we're looking at here at all. Ian (In reply to Ian Kent from comment #3) > > Checking availability in this case does introduce some additional > difficulties which I need to work out how to deal with because we do > need this functionality. > It looks like fixing the failure to cater for the port option will resolve all the observed problems. Testing will tell for sure. Ian Created attachment 1289937 [details]
Patch - remove some redundant rpc library code
Created attachment 1289938 [details]
Patch - add port parameter to rpc_ping()
(In reply to Frank Sorenson from comment #0) > Description of problem: > > The nfs server availability probe to avoid lengthy mount timeouts broke > tunneling of nfs mounts through localhost. > > This also broke mounts when 'port' is specified, but rpcbind is not running. Making the autofs NFS ping handle accept a port parameter should deal with that. When the port option is used rpcbind isn't consulted and a local bind mount isn't attempted. > > Also, the test will get a false positive if the nfs server and rpcbind are > running on the localhost, but the tunneled system is not available. > Using the port option is needed when tunnelling like this. Given that rpcbind isn't consulted when the port option is used and a different local port can be mapped to the NFS port on the remote machine conflicts with what's running on the local machine are avoided. So the added support of a port number parameter for the autofs NFS ping should be enough. Ian A build with the above changes is available at: http://people.redhat.com/~ikent/autofs-5.0.5-132.bz1463004.1.el6_9/ This should fix the ssh tunnelling problem, please have the client test this and report back. Can I have some logs please? One thing that probably should be done (and ins't yet) is to use mount options to reduce the number of things that are being checked for. Created attachment 1291946 [details]
Patch - remove some redundant rpc library code (updated)
Created attachment 1291947 [details]
Patch - add port parameter to rpc_ping() (updated)
Created attachment 1291948 [details]
Patch - dont probe NFSv2 by default
Created attachment 1291949 [details]
Patch - add version parameter to rpc_ping()
A build with updated changes is available at: http://people.redhat.com/~ikent/autofs-5.0.5-132.bz1463004.2.el6_9/ This should reduce the time taken during automounting for the ssh tunnelling problem, please have the client test this and report back. *** Bug 1476343 has been marked as a duplicate of this bug. *** 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-2018:1917 |
Description of problem: The nfs server availability probe to avoid lengthy mount timeouts broke tunneling of nfs mounts through localhost. This also broke mounts when 'port' is specified, but rpcbind is not running. Also, the test will get a false positive if the nfs server and rpcbind are running on the localhost, but the tunneled system is not available. Version-Release number of selected component (if applicable): autofs-5.0.5-131.el6 and newer upstream beginning with commit 4914be9 How reproducible: easy Steps to Reproduce: several options to reproduce the mount failure 1) run nfs server on localhost create automount map entry to mount localhost, specifying a 'port=#' option stop rpcbind 2) create ssh tunnel to another system specify 'port=#' option in automount map (rpcbind not running, or rpcbind running without local nfs server) false positive can be tested by having rpcbind on the local system, but the ssh tunnel not available. Actual results: if map entry gives localhost for an nfs mount and specifies a 'port=#' option, bind mount will not be attempted, but the local system's rpcbind will be probed If the local system is not running rpcbind, this results in a failed mount: ls: cannot access /home/user02: No such file or directory If the local system is running rpcbind, the ping only probes the local system, and not the system through the tunnel. Expected results: if a port number is specified for an nfs mount referring to localhost, the rpc probe will take the requested port into consideration.