* mount.nfs4 clientaddr= option inconsistent behaviour
@ 2007-08-04 15:33 Gabriel Barazer
2007-08-06 15:13 ` [NFS] " Chuck Lever
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Barazer @ 2007-08-04 15:33 UTC (permalink / raw)
To: nfsv4; +Cc: nfs
Hi,
There is an inconsistent behaviour of mount.nfs4 regarding how to
detect/handle the client IP address.
The "clientaddr" option is allowed for mount.nfs4, but this address is
not used for the client IP address, and if there is any DNS failure or
misconfiguration, mount.nfs4 will fail.
The error is in get_my_ipv4addr() at nfs4mount.c:170 (nfs-utils-1.1.0).
This function fills *ip_addr with the client address, detected from the
resolved machine name (gethostname() which is tried to be resolved in
fill_ipv4_sockaddr). This cannot work if the machine name is not (yet)
properly resolvable in DNS at mount time (e.g. we are nfs4-mounting the
root filesystem very early). Using the clientaddr option provided before
trying to resolve the gethostname() hostname, would be IMHO a more
consistent behaviour.
This can cause much trouble too with multihomed clients. The right way
would be to detect the client IP from the server IP (or resolved IP)
(and deal with clients with multiple addresses per subnet, by taking the
lowest address only)
Patch for this is easy (the first part, not the ip detection code), and
can be provided if necessary.
Gabriel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [NFS] mount.nfs4 clientaddr= option inconsistent behaviour
2007-08-04 15:33 mount.nfs4 clientaddr= option inconsistent behaviour Gabriel Barazer
@ 2007-08-06 15:13 ` Chuck Lever
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2007-08-06 15:13 UTC (permalink / raw)
To: Gabriel Barazer; +Cc: nfs, nfsv4
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
Hi Gabriel-
Gabriel Barazer wrote:
> There is an inconsistent behaviour of mount.nfs4 regarding how to
> detect/handle the client IP address.
> The "clientaddr" option is allowed for mount.nfs4, but this address is
> not used for the client IP address, and if there is any DNS failure or
> misconfiguration, mount.nfs4 will fail.
>
> The error is in get_my_ipv4addr() at nfs4mount.c:170 (nfs-utils-1.1.0).
> This function fills *ip_addr with the client address, detected from the
> resolved machine name (gethostname() which is tried to be resolved in
> fill_ipv4_sockaddr). This cannot work if the machine name is not (yet)
> properly resolvable in DNS at mount time (e.g. we are nfs4-mounting the
> root filesystem very early). Using the clientaddr option provided before
> trying to resolve the gethostname() hostname, would be IMHO a more
> consistent behaviour.
I may be mistaken, but I don't think that the Linux NFSv4 implementation
is made for mounting the root file system. You may be wandering into an
area that has had no testing, and in fact, the implementation may not be
designed to do this at all.
> This can cause much trouble too with multihomed clients. The right way
> would be to detect the client IP from the server IP (or resolved IP)
> (and deal with clients with multiple addresses per subnet, by taking the
> lowest address only)
Yes, this is good analysis, I think. Neil Brown added some logic to
mount recently that determines the client's IP address by opening a
socket to the server, and capturing the local endpoint's address. This
takes into account which network interface is used on the client to
contact the server. I'm not sure whether this logic is used for
determining the clientaddr address yet.
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 290 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
NFSv4 mailing list
NFSv4@linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-06 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-04 15:33 mount.nfs4 clientaddr= option inconsistent behaviour Gabriel Barazer
2007-08-06 15:13 ` [NFS] " Chuck Lever
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.