Bug 1029611

Summary: Fresh rhel7 install can't automount nfs exports
Product: Red Hat Enterprise Linux 7 Reporter: David Jaša <djasa>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED CURRENTRELEASE QA Contact: JianHong Yin <jiyin>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: djasa, dkelson, eguan, jiyin, paul, rja, smcbrien
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.0.7-35 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:04:01 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:
Attachments:
Description Flags
/var/log/messages
none
Patch - fix ipv6 libtirpc getport none

Description David Jaša 2013-11-12 17:57:42 UTC
Description of problem:
Fresh rhel7 install can't automount nfs exports.

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

How reproducible:
always on the machine

Steps to Reproduce:
1. install fresh rhel 7
2. chmod +x /etc/auto.net
3. chkconfig autofs on ; service autofs start
4. ls /net/10.34.73.3/  # (as both root and regular user)
5. service autofs status -l

Actual results:
ls: cannot access /net/10.34.73.3: No such file or directory

Redirecting to /bin/systemctl status  -l autofs.service
autofs.service - Automounts filesystems on demand
   Loaded: loaded (/usr/lib/systemd/system/autofs.service; enabled)
   Active: active (running) since Tue 2013-11-12 18:53:35 CET; 36s ago
  Process: 8437 ExecStart=/usr/sbin/automount $OPTIONS --pid-file /run/autofs.pid (code=exited, status=0/SUCCESS)
 Main PID: 8439 (automount)
   CGroup: /system.slice/autofs.service
           └─8439 /usr/sbin/automount --pid-file /run/autofs.pid

Nov 12 18:53:35 dhcp130-218.brq.redhat.com automount[8439]: setautomntent: lookup(sss): setautomntent: No such file or directory
Nov 12 18:53:35 dhcp130-218.brq.redhat.com systemd[1]: Started Automounts filesystems on demand.
Nov 12 18:54:06 dhcp130-218.brq.redhat.com automount[8439]: get_exports: lookup(hosts): exports lookup failed for 10.34.73.3
Nov 12 18:54:06 dhcp130-218.brq.redhat.com automount[8439]: key "10.34.73.3" not found in map source(s).

Expected results:
the directory listing works just fine (shows "nfs" folder)

Additional info:

Comment 1 Ian Kent 2013-11-13 01:30:04 UTC
Please post a full debug log of reproducing the problem.

Ensure that syslog is recording facility daemon and level debug
and above to ensure the debug logging gets recorded.

Then set LOGGING="debug" in the autofs configuration.

Also post the output from "showmount -e 10.34.73.3".

Comment 2 David Jaša 2013-11-13 09:44:40 UTC
Created attachment 823319 [details]
/var/log/messages

# showmount -e 10.34.73.3
Export list for 10.34.73.3:
/nfs *


interesting part of /var/log/messages:

Nov 13 10:38:40 dhcp130-218 automount[14701]: handle_packet: type = 3
Nov 13 10:38:40 dhcp130-218 automount[14701]: handle_packet_missing_indirect: token 1, name 10.34.73.3, request pid 14734
Nov 13 10:38:40 dhcp130-218 automount[14701]: attempting to mount entry /net/10.34.73.3
Nov 13 10:38:40 dhcp130-218 automount[14701]: lookup_mount: lookup(hosts): 10.34.73.3 -> (null)
Nov 13 10:38:40 dhcp130-218 automount[14701]: get_exports: lookup(hosts): fetchng export list for 10.34.73.3
Nov 13 10:38:40 dhcp130-218 automount[14701]: get_exports: lookup(hosts): exports lookup failed for 10.34.73.3
Nov 13 10:38:40 dhcp130-218 automount[14701]: key "10.34.73.3" not found in map source(s).
Nov 13 10:38:40 dhcp130-218 automount[14701]: dev_ioctl_send_fail: token = 1
Nov 13 10:38:40 dhcp130-218 automount[14701]: failed to mount /net/10.34.73.3

Comment 3 Ian Kent 2013-11-13 10:57:51 UTC
Right, I'll try and duplicate it and see.
I believe the impression that the get exports works OK ....
So there might be something at bit more strange going on.

Comment 4 Ian Kent 2013-11-13 10:59:00 UTC
(In reply to Ian Kent from comment #3)
> I believe the impression that the get exports works OK ....

Rather, I believe the get exports works OK ....

Comment 5 David Jaša 2013-11-13 11:07:09 UTC
(In reply to Ian Kent from comment #4)
> (In reply to Ian Kent from comment #3)
> > I believe the impression that the get exports works OK ....
> 
> Rather, I believe the get exports works OK ....

Yes, it does. I can manually mount it (just mount 10.34.73.3:/nfs /mnt/blah) without any issues.

I also checked the config of my RHEL 6 box where automount works just fine and apart from nsswitch (that doesn't mention sss for automount), the configuration is literally the same...

Comment 6 Ian Kent 2013-11-14 00:45:13 UTC
(In reply to David Jaša from comment #5)
> (In reply to Ian Kent from comment #4)
> > (In reply to Ian Kent from comment #3)
> > > I believe the impression that the get exports works OK ....
> > 
> > Rather, I believe the get exports works OK ....

I meant the autofs get exports.

> 
> Yes, it does. I can manually mount it (just mount 10.34.73.3:/nfs /mnt/blah)
> without any issues.
> 
> I also checked the config of my RHEL 6 box where automount works just fine
> and apart from nsswitch (that doesn't mention sss for automount), the
> configuration is literally the same...

Mmmm ... I am able to reproduce it.
It's odd since that code hasn't changed for a long time.
It must be a side effect of some other change.

Ian

Comment 7 Ian Kent 2013-11-14 02:43:18 UTC
I see that configure was throwing an error.
It needed to be regenerated due to a recent change in Fedora
that assumed a configure function existed when it didn't.

Comment 8 Ian Kent 2013-11-14 07:52:33 UTC
Can you try autofs build autofs-5.0.7-34.el7 please.

Comment 9 David Jaša 2013-11-14 08:57:54 UTC
(In reply to Ian Kent from comment #8)
> Can you try autofs build autofs-5.0.7-34.el7 please.

Works for me, thank you.

Comment 10 JianHong Yin 2013-11-15 02:12:28 UTC
Hi Ian, test fail in autofs-5.0.7-34.el7.

{INFO} platform:
RedHatEnterpriseWorkstation 7.0
Linux intel-mahobay-01.rhts.eng.nay.redhat.com 3.10.0-49.el7.x86_64 #1 SMP Tue Nov 12 16:19:27 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
autofs-5.0.7-34.el7.x86_64

================================================================================
[20:57:47 root@ /mnt/tests/CoreOS/autofs/master-config]# ls -l /net/localhost/TEST1
ls: cannot access /net/localhost/TEST1: No such file or directory
:: [   FAIL   ] :: Test auto.net automount (Expected 0, got 2)
--------------------------------------------------------------------------------

================================================================================
[20:58:17 root@ /mnt/tests/CoreOS/autofs/master-config]# mount | grep /net/localhost/TEST1
:: [   FAIL   ] :: hosts mount is OK (Expected 0, got 1)
--------------------------------------------------------------------------------

Comment 12 Ian Kent 2013-11-15 02:59:41 UTC
You really should get rid of the references to auto.net in
that test.

The auto.net script hasn't been used since RHEL-4.
The hosts map is an internal autofs map now.

Comment 13 Ian Kent 2013-11-15 03:04:36 UTC
(In reply to Yin.JianHong from comment #10)
> Hi Ian, test fail in autofs-5.0.7-34.el7.

Odd, it worked ok for the reporter.

> 
> {INFO} platform:
> RedHatEnterpriseWorkstation 7.0
> Linux intel-mahobay-01.rhts.eng.nay.redhat.com 3.10.0-49.el7.x86_64 #1 SMP
> Tue Nov 12 16:19:27 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
> autofs-5.0.7-34.el7.x86_64
> 
> =============================================================================
> ===
> [20:57:47 root@ /mnt/tests/CoreOS/autofs/master-config]# ls -l
> /net/localhost/TEST1
> ls: cannot access /net/localhost/TEST1: No such file or directory
> :: [   FAIL   ] :: Test auto.net automount (Expected 0, got 2)
> -----------------------------------------------------------------------------
> ---
> 
> =============================================================================
> ===
> [20:58:17 root@ /mnt/tests/CoreOS/autofs/master-config]# mount | grep
> /net/localhost/TEST1
> :: [   FAIL   ] :: hosts mount is OK (Expected 0, got 1)
> -----------------------------------------------------------------------------
> ---

OK, I'll check out a machine and run the test.

That's an interesting test.

We're expecting to get the exports list from localhost but
the actual mount will be a bind mount (without the "nobind"
option).

Still it should work.

Ian

Comment 14 JianHong Yin 2013-11-15 03:16:50 UTC
Hi Ian,

this case test all pass in RHEL6.5;
    https://beaker.engineering.redhat.com/jobs/544239
in RHEL7
    ls /net/localhost/TEST1  fail;

Comment 15 Ian Kent 2013-11-19 02:58:06 UTC
Created attachment 825874 [details]
Patch - fix ipv6 libtirpc getport

Comment 17 JianHong Yin 2013-11-27 01:43:26 UTC
*** Bug 1034572 has been marked as a duplicate of this bug. ***

Comment 18 JianHong Yin 2013-11-27 02:16:58 UTC
verified
  https://beaker.engineering.redhat.com/jobs/552115

Comment 19 Russ Anderson 2013-12-03 19:39:45 UTC
FYI, we also hit this problem in rhel7 and installing
autofs-5.0.7-35.el7.x86_64.rpm fixed the problem.

Comment 20 Ian Kent 2013-12-04 00:07:10 UTC
*** Bug 1037796 has been marked as a duplicate of this bug. ***

Comment 21 Dax Kelson 2014-01-06 21:34:00 UTC
How do I get autofs-5.0.7-35.el7.x86_64.rpm? If I connect my RHEL7 beta to the RHN can I get that package?

Comment 22 Ian Kent 2014-01-13 02:48:35 UTC
(In reply to Dax Kelson from comment #21)
> How do I get autofs-5.0.7-35.el7.x86_64.rpm? If I connect my RHEL7 beta to
> the RHN can I get that package?

Not sure but I will put revision 38 on people.redhat.com.

Understand this package is not the official RHEL-7.0 package
yet but it should show up in the repository at some time
unless there are further changes due to ongoing QA work.

Try:
http://people.redhat.com/~ikent/autofs-5.0.7-38.el7/

Comment 23 Dax Kelson 2014-05-10 05:08:23 UTC
RHEL7 release candidate no longer has this bug. This bug should be closed.

Comment 24 Ian Kent 2014-05-12 10:13:38 UTC
(In reply to Dax Kelson from comment #23)
> RHEL7 release candidate no longer has this bug. This bug should be closed.

The bug state is VERIFIED, it'll get closed as part of process
for the GA release.

Comment 25 Ludek Smid 2014-06-13 11:04:01 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.