Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 578742 - =net-fs/autofs-5.1.1-r1 NFS mount problem
Summary: =net-fs/autofs-5.1.1-r1 NFS mount problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-01 10:11 UTC by Sebastian Kricner
Modified: 2019-08-12 21:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Kricner 2016-04-01 10:11:45 UTC
With autofs-5.1.1-r1 NFS mount fails.
Message is: no hosts

autofs-5.1.1 is working.
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-04-02 23:22:48 UTC
I can confirm this.


handle_packet: type = 3
handle_packet_missing_indirect: token 32, name portage, request pid 5318
attempting to mount entry /srv/portage
lookup_mount: lookup(file): looking up portage
lookup_mount: lookup(file): portage -> -fstype=nfs,vers=4,rw   1.2.3.4:/portage
parse_mount: parse(sun): expanded entry: -fstype=nfs,vers=4,rw   1.2.3.4:/portage
parse_mount: parse(sun): gathered options: fstype=nfs,vers=4,rw
parse_mount: parse(sun): dequote("1.2.3.4:/portage") -> 1.2.3.4:/portage
parse_mount: parse(sun): core of entry: options=fstype=nfs,vers=4,rw, loc=1.2.3.4:/portage
sun_mount: parse(sun): mounting root /srv, mountpoint portage, what 1.2.3.4:/portage, fstype nfs, options vers=4,rw
mount_mount: mount(nfs): root=/srv name=portage what=1.2.3.4:/portage, fstype=nfs, options=vers=4,rw
mount_mount: mount(nfs): nfs options="vers=4,rw", nobind=0, nosymlink=0, ro=0
get_nfs_info: called with host 1.2.3.4(1.2.3.4) proto 6 version 0x40
mount(nfs): no hosts available
dev_ioctl_send_fail: token = 32
failed to mount /srv/portage
st_readmap: state 1 path /srv
handle_packet: type = 3
handle_packet_missing_indirect: token 33, name portage, request pid 5318
dev_ioctl_send_fail: token = 33
re-reading map for /srv
lookup_nss_read_map: reading map file /etc/autofs/auto.srv
do_init: parse(sun): init gathered global options: (null)
st_ready: st_ready(): state = 4 path /srv
Comment 2 Spooky Ghost 2016-04-25 13:06:05 UTC
Does use_hostname_for_mounts = "yes" in autofs.conf fix this?  I think I was seeing the same for a an NFS server with A and AAAA records.
Comment 3 Sebastian Kricner 2016-04-25 13:18:26 UTC
Have tested it. It was failing without use_hostname_for_mounts = "yes" and resolved by implementing it into the configuration file.

So i can confirm, that this configuration setting helps.
But it would be very good, to have a notification at the end of the installation step.
Comment 4 Spooky Ghost 2016-04-26 07:43:33 UTC
I think this is the patch that introduces this option:

https://www.kernel.org/pub/linux/daemons/autofs/v5/patches-5.1.2/autofs-5.1.1-add-configuration-option-to-use-hostname-in-mounts.patch

My interpretation about what this is supposed to do and given the behaviour observed I suspect that there is an issue with this.
Comment 5 Yixun Lan archtester gentoo-dev 2016-04-26 08:18:19 UTC
(In reply to Spooky Ghost from comment #4)
> I think this is the patch that introduces this option:
> 
> https://www.kernel.org/pub/linux/daemons/autofs/v5/patches-5.1.2/autofs-5.1.
> 1-add-configuration-option-to-use-hostname-in-mounts.patch
> 
> My interpretation about what this is supposed to do and given the behaviour
> observed I suspect that there is an issue with this.

Indeed, thanks for hunting this down..
Btw, would a einfo or README.gentoo (in pkg_postinst) help?
Comment 6 Oliver Schwabedissen 2016-06-18 09:17:11 UTC
(In reply to Spooky Ghost from comment #2)
> Does use_hostname_for_mounts = "yes" in autofs.conf fix this?  I think I was
> seeing the same for a an NFS server with A and AAAA records.

Solved my problem, too. I updated from v5.0.7-r4 to 5.1.1-r1 today and found that I can't access my Synology NAS any more. 

automounter crashed with a segfault when a normal user tried to access an exported folder from NAS:

Jun 18 10:56:06 frodo kernel: automount[11486]: segfault at 0 ip           (null) sp 00007fbc609fbba8 error 14 in automount[562252fc5000+47000]

Adding hostname_for_mounts = "yes" in autofs.conf and restarting autofs solved my issues.
Comment 7 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-06-18 20:12:52 UTC
I think autofs 5.1.2 has this fixed, can someone else confirm?
Comment 8 Joakim Tjernlund 2016-06-19 15:13:34 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #7)
> I think autofs 5.1.2 has this fixed, can someone else confirm?

5.1.2 works for me while 5.1.1-r1 did not.
Comment 9 Oliver Schwabedissen 2016-06-20 04:33:21 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #7)
> I think autofs 5.1.2 has this fixed, can someone else confirm?

Yes, works for me using the same configuration (autofs.conf) as with v5.0.7 (hostname_for_mounts disabled).