Bug 208757 - New autofs does not seem to like NFSv4
New autofs does not seem to like NFSv4
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ian Kent
Brock Organ
: Reopened
Depends On: 216270
Blocks: 231954
  Show dependency treegraph
 
Reported: 2006-10-01 13:52 EDT by W. Michael Petullo
Modified: 2008-02-15 04:44 EST (History)
3 users (show)

See Also:
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 04:44:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Use fstype in mount_nfs.c instead of hard coded "nfs" (1.45 KB, patch)
2006-10-04 05:09 EDT, Ian Kent
no flags Details | Diff
Patch to handle server probing when "-fstype=nfs4" is specified (1.45 KB, patch)
2006-10-13 04:51 EDT, Ian Kent
no flags Details | Diff
Patch to handle server probing when "-fstype=nfs4" is specified - revised (4.88 KB, patch)
2006-10-15 21:53 EDT, Ian Kent
no flags Details | Diff
tcpdump of automount trying to mount NFSv4 share (23.46 KB, text/plain)
2006-11-26 16:28 EST, W. Michael Petullo
no flags Details
tcpdump of a manual mount of /home (18.46 KB, text/plain)
2006-11-26 16:31 EST, W. Michael Petullo
no flags Details
Patch to avoid using portmap to get NFS 4 server port (6.90 KB, patch)
2006-11-27 04:29 EST, Ian Kent
no flags Details | Diff

  None (edit)
Description W. Michael Petullo 2006-10-01 13:52:28 EDT
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-01 22:07:43 EDT
(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 18:36:59 EDT
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-02 22:38:59 EDT
(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 05:09:01 EDT
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 18:31:27 EDT
The patch proposed in comment #4 works for me.
Comment 6 W. Michael Petullo 2006-10-12 20:17:14 EDT
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-12 23:54:04 EDT
(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 04:46:32 EDT
(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 04:51:20 EDT
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 17:31:50 EDT
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-15 21:50:19 EDT
(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-15 21:53:47 EDT
Created attachment 138543 [details]
Patch to handle server probing when "-fstype=nfs4" is specified - revised
Comment 13 W. Michael Petullo 2006-10-16 19:13:03 EDT
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-16 21:24:22 EDT
(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 04:07:53 EDT
(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 19:14:17 EDT
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-17 21:56:43 EDT
(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 08:09:33 EST
Ian, I am unable to provide any more information right now because of bug #216270.
Comment 19 W. Michael Petullo 2006-11-26 12:17:24 EST
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 13:15:37 EST
(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 16:28:14 EST
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 16:31:05 EST
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 00:21:10 EST
(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 04:29:52 EST
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 17:54:05 EST
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-27 22:26:37 EST
(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 08:14:36 EST
(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 01:48:11 EST
(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-07 20:34:54 EST
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-07 20:46:35 EST
(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 11:25:27 EST
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 11:47:39 EST
(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 03:30:45 EST
(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-15 21:01:17 EST
(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 19:56:18 EDT
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?

Note You need to log in before you can comment on or make changes to this bug.