autofs "lookup_mount: exports lookup" fails on IPv6-only hosts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Debian |
Fix Released
|
Unknown
|
|||
Fedora |
Fix Released
|
Medium
|
|||
autofs (Ubuntu) |
Fix Released
|
Medium
|
Andreas Hasenack |
Bug Description
Using Linux Mint 14 and both autofs 5.0.6 and 5.0.7, when attempting to access an NFS server mounted under /net with an auto.master configuration such as:
/net -hosts
If the host is only accessible over IPv6 (i.e. it only has an AAAA record in DNS, or there is no accessible A address), attempting to 'cd' to its host name (e.g. "cd /net/server") will timeout after a few seconds (bash: cd: server: No such file or directory) and result in a syslog entry similar to:
Jan 19 22:39:43 client automount[5582]: lookup_mount: exports lookup failed for server
Immediately upon adding an accessible A (IPv4) address for the server, everything will work correctly (and NFS mounts created by autofs will continue to use the IPv6 address by default).
It appears that the rpc_get_exports() function in autofs is not correctly defaulting to IPv6 when it is available, even though NFS will default to IPv6, and is failing when the server is not accessible over IPv4.
Related branches
- Andreas Hasenack: Needs Fixing
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 132 lines (+104/-0) (has conflicts)4 files modifieddebian/changelog (+11/-0)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/lp1680224-fix-offset-mount-location-multiple-expa.patch (+62/-0)
debian/patches/series (+5/-0)
Changed in debian: | |
status: | Unknown → New |
Changed in autofs5 (Ubuntu): | |
status: | New → Confirmed |
Changed in autofs (Ubuntu): | |
status: | New → Confirmed |
tags: | added: bot-stop-nagging |
Changed in fedora: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
no longer affects: | autofs5 (Ubuntu) |
Changed in autofs (Ubuntu): | |
status: | Confirmed → In Progress |
assignee: | nobody → Andreas Hasenack (ahasenack) |
no longer affects: | linuxmint |
Changed in debian: | |
status: | New → Fix Released |
Changed in autofs (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | Confirmed → In Progress |
Description of problem:
As part of the World IPv6 Test Day, I tried setting up automount to use an IPv6 address, but it's not working:
$ grep scratchv[46] /etc/auto.data 1.77:/scratch/ 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/
scratchv4 -fstype=nfs4 192.168.
scratchv6 -fstype=nfs4 [2001:470:
$ ls /data/scratchv6
ls: cannot access /data/scratchv6: No such file or directory
$ ls /data/scratchv4
foo
Manually mounting the filesystem works fine, though:
$ sudo mount -t nfs4 [2001:470: 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/ /mnt/tmp
$ ls /mnt/tmp
foo
The changelog indicates that autofs should support IPv6:
$ rpm -q --changelog autofs | grep -i ipv6
- dont fail on ipv6 address when adding host.
- update to provide ipv6 name and address support.
- update to provide ipv6 address parsing.
Version-Release number of selected component (if applicable): 5.0.5-35. fc15.i686
autofs-
How reproducible:
every time
Steps to Reproduce:
1. set up NFSv4 server with IPv6
2. set up autofs client with a map entry pointing to the IPv6 NFSv4 server
3. try to automount a directory
Actual results:
ls: cannot access /data/scratchv6: No such file or directory
Expected results:
access the directory
Additional info: autofs and this is what I saw during the attempt to mount /data/scratchv6
I enabled debug logging in /etc/sysconfig/
Jun 8 12:40:32 corsair automount[2318]: handle_packet: type = 3 packet_ missing_ indirect: token 15, name scratchv6, request pid 3263 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/ 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/ "[2001: 470:1f0f: 46d:f2de: f1ff:fe15: 6496]:/ scratch/ ") -> [2001:470: 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/ fstype= nfs4, loc=[2001: 470:1f0f: 46d:f2de: f1ff:fe15: 6496]:/ scratch/ 1f0f:46d: f2de:f1ff: fe15:6496] :/scratch/ , fstype nfs4, options 470:1f0f: 46d:f2de: f1ff:fe15: 6496]:/ scratch/ , fstype=nfs4, options= send_fail: token = 15
Jun 8 12:40:32 corsair automount[2318]: handle_
Jun 8 12:40:32 corsair automount[2318]: attempting to mount entry /data/scratchv6
Jun 8 12:40:32 corsair automount[2318]: lookup_mount: lookup(file): looking up scratchv6
Jun 8 12:40:32 corsair automount[2318]: lookup_mount: lookup(file): scratchv6 -> -fstype=nfs4 [2001:470:
Jun 8 12:40:32 corsair automount[2318]: parse_mount: parse(sun): expanded entry: -fstype=nfs4 [2001:470:
Jun 8 12:40:32 corsair automount[2318]: parse_mount: parse(sun): gathered options: fstype=nfs4
Jun 8 12:40:32 corsair automount[2318]: parse_mount: parse(sun): dequote(
Jun 8 12:40:32 corsair automount[2318]: parse_mount: parse(sun): core of entry: options=
Jun 8 12:40:32 corsair automount[2318]: sun_mount: parse(sun): mounting root /data, mountpoint scratchv6, what [2001:470:
Jun 8 12:40:32 corsair automount[2318]: mount_mount: mount(nfs): root=/data name=scratchv6 what=[2001:
Jun 8 12:40:32 corsair automount[2318]: mount_mount: mount(nfs): nfs options="", nosymlink=0, ro=0
Jun 8 12:40:37 corsair automount[2318]: add_host_addrs: hostname lookup failed: Name or service not known
Jun 8 12:40:37 corsair automount[2318]: mount(nfs): no hosts available
Jun 8 12:40:37 corsair automount[2318]: st_readmap: state 1 path /data
Jun 8 12:40:37 corsair automount[2318]: dev_ioctl_
Jun...