Bug 208757

Summary: New autofs does not seem to like NFSv4
Product: [Fedora] Fedora Reporter: W. Michael Petullo <redhat>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ikent, jmoyer, vemcontact
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.0.1-0.rc2.28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-15 09:44:46 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: 216270    
Bug Blocks: 231954    
Attachments:
Description Flags
Use fstype in mount_nfs.c instead of hard coded "nfs"
none
Patch to handle server probing when "-fstype=nfs4" is specified
none
Patch to handle server probing when "-fstype=nfs4" is specified - revised
none
tcpdump of automount trying to mount NFSv4 share
none
tcpdump of a manual mount of /home
none
Patch to avoid using portmap to get NFS 4 server port none

Description W. Michael Petullo 2006-10-01 17:52:28 UTC
Description of problem:
I use autofs to mount an NFSv4 volume.  Recently I upgraded to the Rawhide
autofs and found that the new version no longer mounted NFSv4 volumes.

/etc/auto.master:
/shared /etc/auto.shared --timeout=60

/etc/auto.shared:
flyn_mind -fstype=nfs4,rw,insecure,no_subtree_check,sync golem:/

Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.8

How reproducible:
Every time

Steps to Reproduce:
Try to configure autofs to mount an NFSv4 volume.
  
Actual results:
I see the following logged:

Oct  1 12:32:05 imp automount[22498]: open_mount: (mount):cannot open mount
module nfs4 (/usr/lib/autofs/mount_nfs4.so: cannot open shared object file: No
such file or directory)


Expected results:


Additional info:

Comment 1 Ian Kent 2006-10-02 02:07:43 UTC
(In reply to comment #0)
> /etc/auto.shared:
> flyn_mind -fstype=nfs4,rw,insecure,no_subtree_check,sync golem:/

What happens if you leave out the fstype option?

Ian


Comment 2 W. Michael Petullo 2006-10-02 22:36:59 UTC
That does not seem to work.  The share does not mount and I do not see anything
in the logs.

Comment 3 Ian Kent 2006-10-03 02:38:59 UTC
(In reply to comment #2)
> That does not seem to work.  The share does not mount and I do not see anything
> in the logs.

Thought that might be the case.

I've given this some thought and I believe I can fix it without to much
trouble. I'll post a patch for testing as soon as I can but I've got a
few things in the queue ahead of it.

Ian


Comment 4 Ian Kent 2006-10-04 09:09:01 UTC
Created attachment 137726 [details]
Use fstype in mount_nfs.c instead of hard coded "nfs"

Could you try this patch with your NFS4 mounts please.
I hope it will resolve the issue.

Ian

Comment 5 W. Michael Petullo 2006-10-04 22:31:27 UTC
The patch proposed in comment #4 works for me.

Comment 6 W. Michael Petullo 2006-10-13 00:17:14 UTC
I just updated to autofs-5.0.1-0.rc2.10.  I now see this in my log when autofs
tries to mount my NFSv4 share:

Oct 12 19:07:03 imp automount[2705]: using kernel protocol version 5.00
Oct 12 19:07:03 imp automount[2705]: using timeout 60 seconds; freq 15 secs
Oct 12 19:07:17 imp automount[2705]: attempting to mount entry /shared/flyn_mind
Oct 12 19:07:23 imp automount[2705]: mount_mount: mount(nfs): no hosts available
Oct 12 19:07:23 imp automount[2705]: attempting to mount entry /shared/flyn_mind
Oct 12 19:07:23 imp automount[2705]: failed to mount /shared/flyn_mind

Comment 7 Ian Kent 2006-10-13 03:54:04 UTC
(In reply to comment #6)
> I just updated to autofs-5.0.1-0.rc2.10.  I now see this in my log when autofs
> tries to mount my NFSv4 share:
> 
> Oct 12 19:07:03 imp automount[2705]: using kernel protocol version 5.00
> Oct 12 19:07:03 imp automount[2705]: using timeout 60 seconds; freq 15 secs
> Oct 12 19:07:17 imp automount[2705]: attempting to mount entry /shared/flyn_mind
> Oct 12 19:07:23 imp automount[2705]: mount_mount: mount(nfs): no hosts available
> Oct 12 19:07:23 imp automount[2705]: attempting to mount entry /shared/flyn_mind
> Oct 12 19:07:23 imp automount[2705]: failed to mount /shared/flyn_mind

OK. I'll check.
There were some other changes also.

Ian


Comment 8 Ian Kent 2006-10-13 08:46:32 UTC
(In reply to comment #6)
> I just updated to autofs-5.0.1-0.rc2.10.  I now see this in my log when autofs
> tries to mount my NFSv4 share:

I guess I new this issue or something similar would surface.

I'm suprised the patch worked OK before unless you've recently
changed the server to export NFS4 only instead of v3 and v2 as
well as v4. Is that the case?

Anyway, I'd appreciate it if you could try the patch below.

Ian

Comment 9 Ian Kent 2006-10-13 08:51:20 UTC
Created attachment 138409 [details]
Patch to handle server probing when "-fstype=nfs4" is specified

I'm not sure this will do what we want but please give it a try.
This issue opens questions about what NFS versions we should
probe for when checking availability.

Comment 10 W. Michael Petullo 2006-10-13 21:31:50 UTC
I tried the patch from comment #9.  I still see the following problem:

Oct 13 16:29:28 imp automount[17828]: Starting automounter version
5.0.1-0.rc2.10, master map auto.master
Oct 13 16:29:28 imp automount[17828]: #
Oct 13 16:29:28 imp kernel: SELinux: initialized (dev autofs, type autofs), uses
genfs_contexts
Oct 13 16:29:28 imp automount[17828]: mounted autofs indirect mount on /shared
Oct 13 16:29:28 imp automount[17828]: using kernel protocol version 5.00
Oct 13 16:29:28 imp automount[17828]: using timeout 60 seconds; freq 15 secs
Oct 13 16:29:38 imp automount[17828]: attempting to mount entry /shared/flyn_mind
Oct 13 16:29:38 imp automount[17828]: mount_mount: mount(nfs): no hosts available
Oct 13 16:29:38 imp automount[17828]: failed to mount /shared/flyn_mind
Oct 13 16:29:38 imp automount[17828]: attempting to mount entry /shared/flyn_mind
Oct 13 16:29:38 imp automount[17828]: failed to mount /shared/flyn_mind

I'm not sure why I though this worked before.  I may have made a mistake.

Comment 11 Ian Kent 2006-10-16 01:50:19 UTC
(In reply to comment #10)
> I tried the patch from comment #9.  I still see the following problem:
> 
> Oct 13 16:29:28 imp automount[17828]: Starting automounter version
> 5.0.1-0.rc2.10, master map auto.master
> Oct 13 16:29:28 imp automount[17828]: #
> Oct 13 16:29:28 imp kernel: SELinux: initialized (dev autofs, type autofs), uses
> genfs_contexts
> Oct 13 16:29:28 imp automount[17828]: mounted autofs indirect mount on /shared
> Oct 13 16:29:28 imp automount[17828]: using kernel protocol version 5.00
> Oct 13 16:29:28 imp automount[17828]: using timeout 60 seconds; freq 15 secs
> Oct 13 16:29:38 imp automount[17828]: attempting to mount entry /shared/flyn_mind
> Oct 13 16:29:38 imp automount[17828]: mount_mount: mount(nfs): no hosts available
> Oct 13 16:29:38 imp automount[17828]: failed to mount /shared/flyn_mind
> Oct 13 16:29:38 imp automount[17828]: attempting to mount entry /shared/flyn_mind
> Oct 13 16:29:38 imp automount[17828]: failed to mount /shared/flyn_mind
> 
> I'm not sure why I though this worked before.  I may have made a mistake.

I've been able to duplicate and fix this.
I also identified and fixed another error.
Since this clearly needed to be fixed I'm going to commit these
changes now.
Please let me know how the patch below goes in case there's still
more that needs to be sorted.

Ian


Comment 12 Ian Kent 2006-10-16 01:53:47 UTC
Created attachment 138543 [details]
Patch to handle server probing when "-fstype=nfs4" is specified - revised

Comment 13 W. Michael Petullo 2006-10-16 23:13:03 UTC
I tried the patch from comment #12 but I still see the "mount_mount: mount(nfs):
no hosts available" error.

Comment 14 Ian Kent 2006-10-17 01:24:22 UTC
(In reply to comment #13)
> I tried the patch from comment #12 but I still see the "mount_mount: mount(nfs):
> no hosts available" error.

Please post the full debug log.

Ian


Comment 15 Ian Kent 2006-10-17 08:07:53 UTC
(In reply to comment #13)
> I tried the patch from comment #12 but I still see the "mount_mount: mount(nfs):
> no hosts available" error.

I've updated my Rawhide instance and applied the patch above to
autofs-5.0.1-0.rc2.10 as you would have done, and installed the
updated package, and I'm still not able to duplicate this problem.

Are you sure you can mount this file system from the command
line?

Please also post the output of "rpcinfo -p" and "showmount -e"
for the nfs server.

Ian


Comment 16 W. Michael Petullo 2006-10-17 23:14:17 UTC
I am able to mount my NFSv4 volumes using the command line, e.g., mount -t nfs4
golem:/ /MNTPT

rpcinfo -p:
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp   1023  status
    100024    1   tcp    602  status
    100011    1   udp    838  rquotad
    100011    2   udp    838  rquotad
    100011    1   tcp    841  rquotad
    100011    2   tcp    841  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp  32770  nlockmgr
    100021    3   udp  32770  nlockmgr
    100021    4   udp  32770  nlockmgr
    100021    1   tcp  60677  nlockmgr
    100021    3   tcp  60677  nlockmgr
    100021    4   tcp  60677  nlockmgr
    100005    1   udp    864  mountd
    100005    1   tcp    867  mountd
    100005    2   udp    864  mountd
    100005    2   tcp    867  mountd
    100005    3   udp    864  mountd
    100005    3   tcp    867  mountd

showmount -e:
Export list for golem.flyn.org:
/shared      *
/shared/home *

The following is a log of automount with the patch from comment #12 applied.  I
have a mount at /shared/flyn_mind defined by /etc/auto.shared and a mount at
/home defined in LDAP.  In this example, I do a "ls /shared/flyn_mind" to
attempt to cause the NFSv4 volume to be mounted.

Oct 17 18:06:24 imp automount[2668]: Starting automounter version
5.0.1-0.rc2.10, master map auto.master
Oct 17 18:06:24 imp automount[2668]: lookup_nss_read_master: reading master
files auto.master
Oct 17 18:06:24 imp automount[2668]: mount_init: mount(bind): bind_works = 1
Oct 17 18:06:24 imp automount[2668]: lookup_read_master: lookup(file): read
entry /shared
Oct 17 18:06:24 imp automount[2668]: lookup_read_master: lookup(file): read
entry +auto.master
Oct 17 18:06:24 imp automount[2668]: lookup_nss_read_master: reading master
files auto.master
Oct 17 18:06:24 imp automount[2668]: lookup_nss_read_master: reading master ldap
auto.master
Oct 17 18:06:24 imp automount[2668]: parse_server_string: lookup(ldap):
Attempting to parse LDAP information from string "auto.master".
Oct 17 18:06:24 imp automount[2668]: parse_server_string: lookup(ldap): mapname
auto.master
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: ldap authentication
configured with the following options: 
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: use_tls: 0,
tls_required: 0, auth_required: 1, sasl_mech: (null) 
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: user: (null), secret:
unspecified, client principal: (null) 
Oct 17 18:06:24 imp automount[2668]: do_connect: auth_required: 1, sasl_mech (null)
Oct 17 18:06:24 imp automount[2668]: do_connect: lookup(ldap): ldap anonymous
bind returned 0
Oct 17 18:06:24 imp automount[2668]: get_query_dn: lookup(ldap): query dn
ou=auto.master,dc=flyn,dc=org
Oct 17 18:06:24 imp automount[2668]: unbind_ldap_connection: use_tls: 0
Oct 17 18:06:24 imp automount[2668]: do_connect: auth_required: 1, sasl_mech (null)
Oct 17 18:06:24 imp automount[2668]: do_connect: lookup(ldap): ldap anonymous
bind returned 0
Oct 17 18:06:24 imp automount[2668]: lookup_read_master: lookup(ldap): searching
for "(objectclass=automount)" under "ou=auto.master,dc=flyn,dc=org"
Oct 17 18:06:24 imp automount[2668]: lookup_read_master: lookup(ldap): examining
entries
Oct 17 18:06:24 imp automount[2668]: unbind_ldap_connection: use_tls: 0
Oct 17 18:06:24 imp automount[2668]: master_do_mount: mounting /shared
Oct 17 18:06:24 imp automount[2668]: lookup_nss_read_map: reading map file
/etc/auto.shared
Oct 17 18:06:24 imp automount[2668]: mount_init: mount(bind): bind_works = 1
Oct 17 18:06:24 imp kernel: SELinux: initialized (dev autofs, type autofs), uses
genfs_contexts
Oct 17 18:06:24 imp automount[2668]: mounted autofs indirect mount on /shared
Oct 17 18:06:24 imp automount[2668]: using kernel protocol version 5.00
Oct 17 18:06:24 imp automount[2668]: using timeout 60 seconds; freq 15 secs
Oct 17 18:06:24 imp automount[2668]: master_do_mount: mounting /home
Oct 17 18:06:24 imp automount[2668]: lookup_nss_read_map: reading map ldap
ou=auto.home,dc=flyn,dc=org
Oct 17 18:06:24 imp automount[2668]: parse_server_string: lookup(ldap):
Attempting to parse LDAP information from string "ou=auto.home,dc=flyn,dc=org".
Oct 17 18:06:24 imp automount[2668]: parse_server_string: lookup(ldap): server
"(default)", base dn "ou=auto.home,dc=flyn,dc=org"
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: ldap authentication
configured with the following options: 
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: use_tls: 0,
tls_required: 0, auth_required: 1, sasl_mech: (null) 
Oct 17 18:06:24 imp automount[2668]: parse_ldap_config: user: (null), secret:
unspecified, client principal: (null) 
Oct 17 18:06:24 imp automount[2668]: do_connect: auth_required: 1, sasl_mech (null)
Oct 17 18:06:25 imp automount[2668]: do_connect: lookup(ldap): ldap anonymous
bind returned 0
Oct 17 18:06:25 imp automount[2668]: get_query_dn: lookup(ldap): query dn
ou=auto.home,dc=flyn,dc=org
Oct 17 18:06:25 imp automount[2668]: unbind_ldap_connection: use_tls: 0
Oct 17 18:06:25 imp kernel: SELinux: initialized (dev autofs, type autofs), uses
genfs_contexts
Oct 17 18:06:25 imp automount[2668]: mounted autofs indirect mount on /home
Oct 17 18:06:25 imp automount[2668]: using kernel protocol version 5.00
Oct 17 18:06:25 imp automount[2668]: using timeout 300 seconds; freq 75 secs
Oct 17 18:06:29 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:29 imp automount[2668]: handle_packet_missing_indirect: token 4,
name mike, request pid 2365
Oct 17 18:06:29 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:29 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:29 imp automount[2668]: lookup_one: lookup(ldap): searching for
"(&(objectclass=automount)(|(cn=mike)(cn=/)))" under "ou=auto.home,dc=flyn,dc=org"
Oct 17 18:06:29 imp automount[2668]: do_connect: auth_required: 1, sasl_mech (null)
Oct 17 18:06:29 imp automount[2668]: do_connect: lookup(ldap): ldap anonymous
bind returned 0
Oct 17 18:06:29 imp automount[2668]: lookup_one: lookup(ldap): getting first
entry for cn="mike"
Oct 17 18:06:29 imp automount[2668]: lookup_one: lookup(ldap): examining first entry
Oct 17 18:06:29 imp automount[2668]: unbind_ldap_connection: use_tls: 0
Oct 17 18:06:29 imp automount[2668]: lookup_mount: lookup(ldap): mike ->
-fstype=nfs4,rw,insecure,no_subtree_check,sync golem:/home/&
Oct 17 18:06:29 imp automount[2668]: parse_mount: parse(sun): expanded entry:
-fstype=nfs4,rw,insecure,no_subtree_check,sync golem:/home/mike
Oct 17 18:06:29 imp automount[2668]: parse_mount: parse(sun): gathered options:
fstype=nfs4,rw,insecure,no_subtree_check,sync
Oct 17 18:06:29 imp automount[2668]: parse_mount: parse(sun):
dequote("golem:/home/mike") -> golem:/home/mike
Oct 17 18:06:29 imp automount[2668]: parse_mount: parse(sun): core of entry:
options=fstype=nfs4,rw,insecure,no_subtree_check,sync, loc=golem:/home/mike
Oct 17 18:06:29 imp automount[2668]: sun_mount: parse(sun): mounting root /home,
mountpoint mike, what golem:/home/mike, fstype nfs4, options
rw,insecure,no_subtree_check,sync
Oct 17 18:06:29 imp automount[2668]: do_mount: golem:/home/mike /home/mike type
nfs4 options rw,insecure,no_subtree_check,sync using module nfs4
Oct 17 18:06:29 imp automount[2668]: mount_mount: mount(nfs): root=/home
name=mike what=golem:/home/mike, fstype=nfs4,
options=rw,insecure,no_subtree_check,sync
Oct 17 18:06:29 imp automount[2668]: mount_mount: mount(nfs): nfs
options="rw,insecure,no_subtree_check,sync", nosymlink=0, ro=0
Oct 17 18:06:32 imp automount[2668]: mount_mount: mount(nfs): no hosts available
Oct 17 18:06:32 imp automount[2668]: send_fail: token = 4
Oct 17 18:06:32 imp automount[2668]: failed to mount /home/mike
Oct 17 18:06:33 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:33 imp automount[2668]: handle_packet_missing_indirect: token 5,
name mike, request pid 2365
Oct 17 18:06:33 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:33 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:33 imp automount[2668]: send_fail: token = 5
Oct 17 18:06:33 imp automount[2668]: failed to mount /home/mike
Oct 17 18:06:34 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:34 imp automount[2668]: handle_packet_missing_indirect: token 6,
name flyn_mind, request pid 2681
Oct 17 18:06:34 imp automount[2668]: attempting to mount entry /shared/flyn_mind
Oct 17 18:06:34 imp automount[2668]: lookup_mount: lookup(file): looking up
flyn_mind
Oct 17 18:06:34 imp automount[2668]: lookup_mount: lookup(file): flyn_mind ->
-fstype=nfs4,rw,insecure,no_subtree_check,sync golem.flyn.org:/
Oct 17 18:06:34 imp automount[2668]: parse_mount: parse(sun): expanded entry:
-fstype=nfs4,rw,insecure,no_subtree_check,sync golem.flyn.org:/
Oct 17 18:06:34 imp automount[2668]: parse_mount: parse(sun): gathered options:
fstype=nfs4,rw,insecure,no_subtree_check,sync
Oct 17 18:06:34 imp automount[2668]: parse_mount: parse(sun):
dequote("golem.flyn.org:/") -> golem.flyn.org:/
Oct 17 18:06:34 imp automount[2668]: parse_mount: parse(sun): core of entry:
options=fstype=nfs4,rw,insecure,no_subtree_check,sync, loc=golem.flyn.org:/
Oct 17 18:06:34 imp automount[2668]: sun_mount: parse(sun): mounting root
/shared, mountpoint flyn_mind, what golem.flyn.org:/, fstype nfs4, options
rw,insecure,no_subtree_check,sync
Oct 17 18:06:34 imp automount[2668]: do_mount: golem.flyn.org:/
/shared/flyn_mind type nfs4 options rw,insecure,no_subtree_check,sync using
module nfs4
Oct 17 18:06:34 imp automount[2668]: mount_mount: mount(nfs): root=/shared
name=flyn_mind what=golem.flyn.org:/, fstype=nfs4,
options=rw,insecure,no_subtree_check,sync
Oct 17 18:06:34 imp automount[2668]: mount_mount: mount(nfs): nfs
options="rw,insecure,no_subtree_check,sync", nosymlink=0, ro=0
Oct 17 18:06:37 imp automount[2668]: mount_mount: mount(nfs): no hosts available
Oct 17 18:06:37 imp automount[2668]: send_fail: token = 6
Oct 17 18:06:37 imp automount[2668]: failed to mount /shared/flyn_mind
Oct 17 18:06:37 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:37 imp automount[2668]: handle_packet_missing_indirect: token 7,
name flyn_mind, request pid 2681
Oct 17 18:06:37 imp automount[2668]: attempting to mount entry /shared/flyn_mind
Oct 17 18:06:37 imp automount[2668]: lookup_mount: lookup(file): looking up
flyn_mind
Oct 17 18:06:37 imp automount[2668]: send_fail: token = 7
Oct 17 18:06:37 imp automount[2668]: failed to mount /shared/flyn_mind
Oct 17 18:06:37 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:37 imp automount[2668]: handle_packet_missing_indirect: token 8,
name mike, request pid 2365
Oct 17 18:06:37 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:37 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:37 imp automount[2668]: send_fail: token = 8
Oct 17 18:06:37 imp automount[2668]: failed to mount /home/mike
Oct 17 18:06:41 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:41 imp automount[2668]: handle_packet_missing_indirect: token 9,
name mike, request pid 2365
Oct 17 18:06:41 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:41 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:41 imp automount[2668]: send_fail: token = 9
Oct 17 18:06:41 imp automount[2668]: failed to mount /home/mike
Oct 17 18:06:42 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:42 imp automount[2668]: handle_packet_missing_indirect: token 10,
name mike, request pid 2357
Oct 17 18:06:42 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:42 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:42 imp automount[2668]: send_fail: token = 10
Oct 17 18:06:42 imp automount[2668]: handle_packet: type = 3
Oct 17 18:06:42 imp automount[2668]: handle_packet_missing_indirect: token 11,
name mike, request pid 2357
Oct 17 18:06:42 imp automount[2668]: attempting to mount entry /home/mike
Oct 17 18:06:42 imp automount[2668]: failed to mount /home/mike
Oct 17 18:06:42 imp automount[2668]: lookup_mount: lookup(ldap): looking up mike
Oct 17 18:06:42 imp automount[2668]: send_fail: token = 11
Oct 17 18:06:42 imp automount[2668]: failed to mount /home/mike

Comment 17 Ian Kent 2006-10-18 01:56:43 UTC
(In reply to comment #16)
> I am able to mount my NFSv4 volumes using the command line, e.g., mount -t nfs4
> golem:/ /MNTPT

That was my next question, thanks.

> 
> rpcinfo -p:

And the rpcinfo -p <server> please.

The only thing I can think of is that I must have a mismatch
of the service version of either the remote portmapper or
nfs services somehow.

Ian


Comment 18 W. Michael Petullo 2006-11-18 13:09:33 UTC
Ian, I am unable to provide any more information right now because of bug #216270.

Comment 19 W. Michael Petullo 2006-11-26 17:17:24 UTC
Bug #216270 was NOTABUG. But, with autofs-5.0.1-0.rc2.22 and
kernel-2.6.18-1.2849.fc6 I am still getting the "mount_mount: mount(nfs): no
hosts available" error above.

Comment 20 Ian Kent 2006-11-26 18:15:37 UTC
(In reply to comment #19)
> Bug #216270 was NOTABUG. But, with autofs-5.0.1-0.rc2.22 and
> kernel-2.6.18-1.2849.fc6 I am still getting the "mount_mount: mount(nfs): no
> hosts available" error above.

I don't see how 216270 is related to this.
This looks like some sort of a bug with the autofs server
probing.

Last time I looked at this bug I thought it might help to get
a tcpdump of the packets of a failed mount so I could re-run
it and see what autofs is requesting.

Could you do that please.

Ian


Comment 21 W. Michael Petullo 2006-11-26 21:28:14 UTC
Created attachment 142139 [details]
tcpdump of automount trying to mount NFSv4 share

This was captured by script.  The tcpdump command was run in the background
while I started automount (/etc/init.d/autofs start) and did a "ls /home/mike."
 This should trigger an automount.

Comment 22 W. Michael Petullo 2006-11-26 21:31:05 UTC
Created attachment 142140 [details]
tcpdump of a manual mount of /home

This was captured by script.  I ran tcpdump in the background while I manually
mounted using "mount -t nfs4 golem:/home /home."

Comment 23 Ian Kent 2006-11-27 05:21:10 UTC
(In reply to comment #22)
> Created an attachment (id=142140) [edit]
> tcpdump of a manual mount of /home
> 
> This was captured by script.  I ran tcpdump in the background while I manually
> mounted using "mount -t nfs4 golem:/home /home."

I was hoping for a binary capture so I could replay it
but I think I see my mistake anyway.

I'm trying to use portmap to lookup the NFS server port
and the NFS 4 RFC says that the default port should be
the registered NFS port (2049) removing the requirement
to use RPC bind protocols to obtain the port.

It looks like the portmapper is blocked in your environment
15:16:55.016445 IP imp.flyn.org.36566 > golem.flyn.org.sunrpc:
     S 4032168933:4032168933(0) win 5840 <mss 1460,sackOK,
     timestamp 4294966259 0,nop,wscale 5>
15:16:55.016695 IP golem.flyn.org > imp.flyn.org: ICMP host
    golem.flyn.org unreachable - admin prohibited, length 68

so I will need to pass the mount options down to the routines
that check for server availability to check for a possible
"port=" option as well.

I'll get onto it.

Ian


Comment 24 Ian Kent 2006-11-27 09:29:52 UTC
Created attachment 142159 [details]
Patch to avoid using portmap to get NFS 4 server port

This patch should resolve the NFS 4 problem.
You may need to update autofs if this doesn't apply but
it should apply ok.

Please try it out.

Ian

Comment 25 W. Michael Petullo 2006-11-27 22:54:05 UTC
I applied the patch in comment #24 to autofs-5.0.1-0.rc2.22.  This patched
autofs works fine.  NFSv4 mounts now work for me.  Thank you, Ian, for your
persistence!

Comment 26 Ian Kent 2006-11-28 03:26:37 UTC
(In reply to comment #25)
> I applied the patch in comment #24 to autofs-5.0.1-0.rc2.22.  This patched
> autofs works fine.  NFSv4 mounts now work for me.  Thank you, Ian, for your
> persistence!

Excellent, I set about updating the package and close the bug.
Thank you for your patience.

Ian


Comment 27 Ian Kent 2006-11-28 13:14:36 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > I applied the patch in comment #24 to autofs-5.0.1-0.rc2.22.  This patched
> > autofs works fine.  NFSv4 mounts now work for me.  Thank you, Ian, for your
> > persistence!
> 
> Excellent, I set about updating the package and close the bug.
> Thank you for your patience.

Just a heads up I've managed to find a couple of stupid mistakes
with this patch. I'll update it as soon as I've completed testing.
Hopefully they won't cause you trouble. 
Sorry.

Ian


Comment 28 Ian Kent 2006-12-06 06:48:11 UTC
(In reply to comment #27)
> (In reply to comment #26)
> > (In reply to comment #25)
> > > I applied the patch in comment #24 to autofs-5.0.1-0.rc2.22.  This patched
> > > autofs works fine.  NFSv4 mounts now work for me.  Thank you, Ian, for your
> > > persistence!
> > 
> > Excellent, I set about updating the package and close the bug.
> > Thank you for your patience.
> 
> Just a heads up I've managed to find a couple of stupid mistakes
> with this patch. I'll update it as soon as I've completed testing.
> Hopefully they won't cause you trouble. 
> Sorry.

I've updated the rpm in Rawhide.
When you get a chance can you verify this still works in
case I've made any stupid mistakes, please.

Ian



Comment 29 W. Michael Petullo 2006-12-08 01:34:54 UTC
It looks like autofs-5.0.1-0.rc2.28.1 fixes this problem.  I just tried this
package and it works fine with my configuration.

Comment 30 Ian Kent 2006-12-08 01:46:35 UTC
(In reply to comment #29)
> It looks like autofs-5.0.1-0.rc2.28.1 fixes this problem.  I just tried this
> package and it works fine with my configuration.

That's great, thanks.

Comment 31 P Rauser 2007-02-06 16:25:27 UTC
Ian,

I've been tracking this bug and, unfortunately, the resolution in the updated
package (i'm now using autofs-5.0.1-0.rc3.15) does not work in our config.  The
only difference that I can see between Mike's setup and ours (though we use a
map file, not ldap) is that we wrap NFS4 in ssh for security reasons.  Thus,
port 2049 is tunnelled through port 8888, and the share we seek to mount is on
127.0.0.1.  Our map entry is as follows:

storage-pcrau
-fstype=nfs4,rw,soft,rsize=8192,wsize=8192,nosuid,nodev,noexec,proto=tcp,port=8888
127.0.0.1:/storage-pcrau

We were able to successfully automount this share using autofs-5.0.1-0.rc2.8,
but have not had any luck with any more-recent package.

We are able to mount the share manually using:

mount -t nfs4 -o
rw,soft,rsize=8192,wsize=8192,nosuid,nodev,noexec,proto=tcp,port=8888
127.0.0.1:/storage-pcrau /home/pcrau/aegisnet-pcrau/storage-pcrau

Based on comment 23 above, I'm guessing that there's still an issue with the
handling of the "port= " option, but am not sure.  Are their any logs, etc. I
could supply to help you debug this? 

Comment 32 Ian Kent 2007-02-06 16:47:39 UTC
(In reply to comment #31)
> Ian,
> 
> I've been tracking this bug and, unfortunately, the resolution in the updated
> package (i'm now using autofs-5.0.1-0.rc3.15) does not work in our config.  The
> only difference that I can see between Mike's setup and ours (though we use a
> map file, not ldap) is that we wrap NFS4 in ssh for security reasons.  Thus,
> port 2049 is tunnelled through port 8888, and the share we seek to mount is on
> 127.0.0.1.  Our map entry is as follows:
> 
> storage-pcrau
> -fstype=nfs4,rw,soft,rsize=8192,wsize=8192,nosuid,nodev,noexec,proto=tcp,port=8888
> 127.0.0.1:/storage-pcrau
> 
> We were able to successfully automount this share using autofs-5.0.1-0.rc2.8,
> but have not had any luck with any more-recent package.
> 
> We are able to mount the share manually using:
> 
> mount -t nfs4 -o
> rw,soft,rsize=8192,wsize=8192,nosuid,nodev,noexec,proto=tcp,port=8888
> 127.0.0.1:/storage-pcrau /home/pcrau/aegisnet-pcrau/storage-pcrau
> 
> Based on comment 23 above, I'm guessing that there's still an issue with the
> handling of the "port= " option, but am not sure.  Are their any logs, etc. I
> could supply to help you debug this? 

Yep.
Get a debug log please.
See http://people.redhat.com/jmoyer for any infomation about
doing this that your unsure of.

I can't see any changes that look like they would cause this
to stop working. I'll look deeper into it.

Ian


Comment 33 Ian Kent 2007-02-08 08:30:45 UTC
(In reply to comment #32)
> > 
> > Based on comment 23 above, I'm guessing that there's still an issue with the
> > handling of the "port= " option, but am not sure.  Are their any logs, etc. I
> > could supply to help you debug this? 
> 
> Yep.
> Get a debug log please.
> See http://people.redhat.com/jmoyer for any infomation about
> doing this that your unsure of.
> 
> I can't see any changes that look like they would cause this
> to stop working. I'll look deeper into it.

I can see how this could be a problem now.
There are a couple of issues handling local mounts
that I'm working on.

Please still post a debug log.

Ian
> 
> Ian
> 



Comment 34 Ian Kent 2007-02-16 02:01:17 UTC
(In reply to comment #31)
> Ian,
> 
> I've been tracking this bug and, unfortunately, the resolution in the updated
> package (i'm now using autofs-5.0.1-0.rc3.15) does not work in our config.  The
> only difference that I can see between Mike's setup and ours (though we use a
> map file, not ldap) is that we wrap NFS4 in ssh for security reasons.  Thus,
> port 2049 is tunnelled through port 8888, and the share we seek to mount is on
> 127.0.0.1.  Our map entry is as follows:

Yes. We found and fixed a problem with localhost mounts.

> 
> Based on comment 23 above, I'm guessing that there's still an issue with the
> handling of the "port= " option, but am not sure.  Are their any logs, etc. I
> could supply to help you debug this? 

Could be but could you try using autofs-5.0.1-0.rc3.22 when
it's available on the mirrors please.

Ian

Comment 35 W. Michael Petullo 2007-07-12 23:56:18 UTC
Is anyone still having a problem with this?  The original problem that I opened
this bug with has been fixed.  Can this bug be closed again?