All of lore.kernel.org
 help / color / mirror / Atom feed
* NFSv4 referrals with FQDN.
@ 2021-03-23 21:56 Pradeep
  2021-03-24 19:20 ` Chuck Lever III
  0 siblings, 1 reply; 3+ messages in thread
From: Pradeep @ 2021-03-23 21:56 UTC (permalink / raw)
  To: Linux NFS Mailing List

Hello,

While testing NFSv4 referrals, I noticed that if the server name in FS
locations does not have IPv4 mapping (server name has AAAA record for
IPv6; but no A record in DNS), the referral mount fails. With debug
enabled, I get something like this:

 nfs_follow_referral: referral at /nfs_export_1
 nfs4_path: path server-1.domain.com:/nfs_export_1 from nfs_path
 nfs4_path: path component /nfs_export_1
 nfs4_validate_fspath: comparing path /nfs_export_1 with fsroot /nfs_export_1
 ==> dns_query((null),server-2.domain.com,19,(null))
 call request_key(,server-2.domain.com,)
 <== dns_query() = -126
 nfs_follow_referral: done
 nfs_do_refmount: done
 RPC:       shutting down nfs client for server-1.domain.com
 RPC:       rpc_release_client(ffff97fdf170c600)
 RPC:       destroying nfs client for server-1.domain.com
 <-- nfs_d_automount(): error -2

It looks like NFS client does an upcall to "/sbin/key.dns_resolver".
"/sbin/key.dns_resolver" works if callout info is set to 'ipv6'.
Otherwise it fails too.

Does this mean setups with only IPv6 records (AAAA records in DNS),
NFSv4 referrals won't work if server returns FQDN in referral? If
anyone has tried this and made it work, please let me know.

Thanks,
Pradeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NFSv4 referrals with FQDN.
  2021-03-23 21:56 NFSv4 referrals with FQDN Pradeep
@ 2021-03-24 19:20 ` Chuck Lever III
  2021-03-25 17:03   ` Pradeep
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever III @ 2021-03-24 19:20 UTC (permalink / raw)
  To: Pradeep; +Cc: Linux NFS Mailing List



> On Mar 23, 2021, at 5:56 PM, Pradeep <pradeepthomas@gmail.com> wrote:
> 
> Hello,
> 
> While testing NFSv4 referrals, I noticed that if the server name in FS
> locations does not have IPv4 mapping (server name has AAAA record for
> IPv6; but no A record in DNS), the referral mount fails.

IIRC, that is a known bug, but it has been rarely hit up to this point
(only case I'm aware of is during testing, which is how I know about
this issue).

The DNS upcall needs to be fixed to handle this case properly. As Bruce
likes to say, patches welcome!


> With debug enabled, I get something like this:
> 
> nfs_follow_referral: referral at /nfs_export_1
> nfs4_path: path server-1.domain.com:/nfs_export_1 from nfs_path
> nfs4_path: path component /nfs_export_1
> nfs4_validate_fspath: comparing path /nfs_export_1 with fsroot /nfs_export_1
> ==> dns_query((null),server-2.domain.com,19,(null))
> call request_key(,server-2.domain.com,)
> <== dns_query() = -126
> nfs_follow_referral: done
> nfs_do_refmount: done
> RPC:       shutting down nfs client for server-1.domain.com
> RPC:       rpc_release_client(ffff97fdf170c600)
> RPC:       destroying nfs client for server-1.domain.com
> <-- nfs_d_automount(): error -2
> 
> It looks like NFS client does an upcall to "/sbin/key.dns_resolver".
> "/sbin/key.dns_resolver" works if callout info is set to 'ipv6'.
> Otherwise it fails too.
> 
> Does this mean setups with only IPv6 records (AAAA records in DNS),
> NFSv4 referrals won't work if server returns FQDN in referral? If
> anyone has tried this and made it work, please let me know.
> 
> Thanks,
> Pradeep

--
Chuck Lever




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NFSv4 referrals with FQDN.
  2021-03-24 19:20 ` Chuck Lever III
@ 2021-03-25 17:03   ` Pradeep
  0 siblings, 0 replies; 3+ messages in thread
From: Pradeep @ 2021-03-25 17:03 UTC (permalink / raw)
  To: Chuck Lever III; +Cc: Linux NFS Mailing List

Thanks Chuck for confirming that. I will try to post a patch after testing.

On Wed, Mar 24, 2021 at 12:20 PM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Mar 23, 2021, at 5:56 PM, Pradeep <pradeepthomas@gmail.com> wrote:
> >
> > Hello,
> >
> > While testing NFSv4 referrals, I noticed that if the server name in FS
> > locations does not have IPv4 mapping (server name has AAAA record for
> > IPv6; but no A record in DNS), the referral mount fails.
>
> IIRC, that is a known bug, but it has been rarely hit up to this point
> (only case I'm aware of is during testing, which is how I know about
> this issue).
>
> The DNS upcall needs to be fixed to handle this case properly. As Bruce
> likes to say, patches welcome!
>
>
> > With debug enabled, I get something like this:
> >
> > nfs_follow_referral: referral at /nfs_export_1
> > nfs4_path: path server-1.domain.com:/nfs_export_1 from nfs_path
> > nfs4_path: path component /nfs_export_1
> > nfs4_validate_fspath: comparing path /nfs_export_1 with fsroot /nfs_export_1
> > ==> dns_query((null),server-2.domain.com,19,(null))
> > call request_key(,server-2.domain.com,)
> > <== dns_query() = -126
> > nfs_follow_referral: done
> > nfs_do_refmount: done
> > RPC:       shutting down nfs client for server-1.domain.com
> > RPC:       rpc_release_client(ffff97fdf170c600)
> > RPC:       destroying nfs client for server-1.domain.com
> > <-- nfs_d_automount(): error -2
> >
> > It looks like NFS client does an upcall to "/sbin/key.dns_resolver".
> > "/sbin/key.dns_resolver" works if callout info is set to 'ipv6'.
> > Otherwise it fails too.
> >
> > Does this mean setups with only IPv6 records (AAAA records in DNS),
> > NFSv4 referrals won't work if server returns FQDN in referral? If
> > anyone has tried this and made it work, please let me know.
> >
> > Thanks,
> > Pradeep
>
> --
> Chuck Lever
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-25 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 21:56 NFSv4 referrals with FQDN Pradeep
2021-03-24 19:20 ` Chuck Lever III
2021-03-25 17:03   ` Pradeep

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.