Skip to contentSkip to conversation

Create a DNS SRV record of the ID mapping domain

RFC PATCH In review Steve Dickson 4 participants 13 messages May 23, 2016 – May 25, 2016

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

RFC PATCH 1/1 libnfsidmap: Query DNS for the NFSv4 ID domain

In reply to Steve Dickson

When a DNS domain is found in nfs4_init_name_mapping() query the DNS for the _nfsv4-iddomainname.tcp SRV record. When the record exists, use that as the v4 id domain.

---
 configure.ac  |  1 +
 libnfsidmap.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 89 insertions(+), 1 deletion(-)
configure.ac +1 -0
index 5944166..52e12c8 100644
@@ -13,6 +13,7 @@ LT_INIT
 AC_PROG_CC
 
 # Checks for libraries.
+AC_CHECK_LIB([resolv], [res_querydomain])
 
 AC_ARG_ENABLE([ldap],
 	[AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:@default=detect@:>@])])
libnfsidmap.c +88 -1

119 lines not on this page · raw message

Signature · 1 line
2.5.0
#0 lore raw

cover Create a DNS SRV record of the ID mapping domain

I have a customer that requested the domain used to do the ID mapping be available via DNS SVR record. I didn't think was that bad of an idea.

IPA and FedFS use SRV records which seem to work out pretty well. This patch is heavily based on the FedFS code. ;-)

My only question is do we want libnfsidmap to be dependent on the resolver library. There has been some talk about moving libnfsidmap into nfs-utils which means nfs-utils would be dependent the resolver library.

Note, this is not complete. If we are going to do this I have to document it somehow, either in the man page or idmap.conf or both.

Just looking for thoughts... good/bad idea??

Steve Dickson (1):
libnfsidmap: Query DNS for the NFSv4 ID domain

 configure.ac  |  1 +
 libnfsidmap.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 89 insertions(+), 1 deletion(-)
Signature · 1 line
2.5.0
#2 lore raw
Quoted 6 lines · Steve Dickson

I have a customer that requested the domain used to do the ID mapping be available via DNS SVR record. I didn't think was that bad of an idea.

Solaris NFS peers look for a TXT record. This facility has been around for a decade or more.

;; NFSv4 domain (for idmapping). See Sun doc 819-1634 and
;; http://tools.ietf.org/html/draft-mesta-nfsv4-domain-01.html
_nfsv4idmapdomain IN TXT "oracle.com"

But there's no standard in this area. mesta-nfsv4-domain was a personal I-D that never advanced. I brought it up again in Orlando, and the WG decided to table it.

At the time it was decided that the right course of action was for the NFSv4 idmapping domain to be set based on security realm or other criteria. There was no interest in involving DNS at all.

Quoted 10 lines

IPA and FedFS use SRV records which seem to work out pretty well. This patch is heavily based on the FedFS code. ;-)

My only question is do we want libnfsidmap to be dependent on the resolver library. There has been some talk about moving libnfsidmap into nfs-utils which means nfs-utils would be dependent the resolver library.

Quoted 5 lines

Note, this is not complete. If we are going to do this I have to document it somehow, either in the man page or idmap.conf or both.

Just looking for thoughts... good/bad idea??

If you really do want to go down this path, I think Linux should follow the existing de facto standard (TXT), not invent its own. Maybe also check how SMB does this.

Involving a published DNS record format should require standards action. But I was discouraged from pursuing this further.

I think it's important to ask in what cases will the ID mapping domain be different than the system's DNS domain name, and is there a preferable mechanism for determining the ID mapping domain in those cases? Knowing more about how your customer plans to use this feature would help us discuss this more fully.

I've also proposed the ability to set the ID mapping domain via a command line tool like nfsidmap. But I never got past the difficulties of parsing and updating the /etc/idmapd.conf file. It makes sense to add an API to libnfsidmap for setting the system's ID mapping domain name.

How would "nfsidmap -d" work if the ID mapping domain was set via DNS?

Would the DNS-derived ID domain name be cached somewhere?

Quoted 9 lines

Steve Dickson (1):
libnfsidmap: Query DNS for the NFSv4 ID domain

configure.ac | 1 +
libnfsidmap.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-

2 files changed, 89 insertions(+), 1 deletion(-)
Signature · 1 line
2.5.0

--
Chuck Lever

#3 lore raw

Hello,

Quoted 7 lines · Chuck Lever
Quoted 6 lines · Steve Dickson

I have a customer that requested the domain used to do the ID mapping be available via DNS SVR record. I didn't think was that bad of an idea.

Quoted 6 lines

Solaris NFS peers look for a TXT record. This facility has been around for a decade or more.

;; NFSv4 domain (for idmapping). See Sun doc 819-1634 and
;; http://tools.ietf.org/html/draft-mesta-nfsv4-domain-01.html
_nfsv4idmapdomain IN TXT "oracle.com"

I see... Looks reasonable

Quoted 9 lines

But there's no standard in this area. mesta-nfsv4-domain was a personal I-D that never advanced. I brought it up again in Orlando, and the WG decided to table it.

At the time it was decided that the right course of action was for the NFSv4 idmapping domain to be set based on security realm or other criteria. There was no interest in involving DNS at all.

Hmm... it seems pretty convenient to me... although its just another place for rpc.idmap to get hung. ;-)

Quoted 16 lines
Quoted 16 lines

IPA and FedFS use SRV records which seem to work out pretty well. This patch is heavily based on the FedFS code. ;-)

My only question is do we want libnfsidmap to be dependent on the resolver library. There has been some talk about moving libnfsidmap into nfs-utils which means nfs-utils would be dependent the resolver library.

Note, this is not complete. If we are going to do this I have to document it somehow, either in the man page or idmap.conf or both.

Quoted 6 lines
Quoted 1 line

Just looking for thoughts... good/bad idea??

If you really do want to go down this path, I think Linux should follow the existing de facto standard (TXT), not invent its own. Maybe also check how SMB does this.

I think I will and I agree using a TXT RR is the way to go... Why reinvent the wheel?? 8-)

Quoted 4 lines

Involving a published DNS record format should require standards action. But I was discouraged from pursuing this further.

I think if everybody is doing the same thing would be good enough...

Quoted 8 lines

I think it's important to ask in what cases will the ID mapping domain be different than the system's DNS domain name, and is there a preferable mechanism for determining the ID mapping domain in those cases? Knowing more about how your customer plans to use this feature would help us discuss this more fully.

This would help me here at Red Hat. I live on at (eat your own dog food) test network that has its own DNS

So [email protected] maps into a valid id/gid but [email protected] does not so I need to add a Domain=redhat.com in /etc/idmapd.conf to get v4 working. Having the domain in our test DNS would work out well.

Also, the person that is asking for this is probably moving from a Solaris env to Linx env... That's just a guess.

Quoted 7 lines

I've also proposed the ability to set the ID mapping domain via a command line tool like nfsidmap. But I never got past the difficulties of parsing and updating the /etc/idmapd.conf file. It makes sense to add an API to libnfsidmap for setting the system's ID mapping domain name.

Does having the domain in DNS help with this? I'm thinking not...

Quoted 3 lines

How would "nfsidmap -d" work if the ID mapping domain was set via DNS?

I guess we would have to teach nfs4_get_default_domain() to check DNS like nfs4_init_name_mapping() would.

Quoted 3 lines

Would the DNS-derived ID domain name be cached somewhere?

Currently its stored in the global default_domain variable in libnfsidmap... I think its a good place for it to live.

steved.

#4 lore raw
Quoted 26 lines · Steve Dickson

Hello,

Quoted 7 lines · Chuck Lever
Quoted 6 lines · Steve Dickson

I have a customer that requested the domain used to do the ID mapping be available via DNS SVR record. I didn't think was that bad of an idea.

Quoted 6 lines

Solaris NFS peers look for a TXT record. This facility has been around for a decade or more.

;; NFSv4 domain (for idmapping). See Sun doc 819-1634 and
;; http://tools.ietf.org/html/draft-mesta-nfsv4-domain-01.html
_nfsv4idmapdomain IN TXT "oracle.com"

I see... Looks reasonable

Quoted 5 lines

But there's no standard in this area. mesta-nfsv4-domain was a personal I-D that never advanced. I brought it up again in Orlando, and the WG decided to table it.

Quoted 6 lines
Quoted 4 lines

At the time it was decided that the right course of action was for the NFSv4 idmapping domain to be set based on security realm or other criteria. There was no interest in involving DNS at all.

Hmm... it seems pretty convenient to me... although its just another place for rpc.idmap to get hung. ;-)

Right, see below for a way to prevent that.

Quoted 42 lines
Quoted 14 lines
Quoted 14 lines

IPA and FedFS use SRV records which seem to work out pretty well. This patch is heavily based on the FedFS code. ;-)

My only question is do we want libnfsidmap to be dependent on the resolver library. There has been some talk about moving libnfsidmap into nfs-utils which means nfs-utils would be dependent the resolver library.

Note, this is not complete. If we are going to do this I have to document it somehow, either in the man page or idmap.conf or both.

Quoted 6 lines
Quoted 1 line

Just looking for thoughts... good/bad idea??

If you really do want to go down this path, I think Linux should follow the existing de facto standard (TXT), not invent its own. Maybe also check how SMB does this.

I think I will and I agree using a TXT RR is the way to go... Why reinvent the wheel?? 8-)

Quoted 4 lines

Involving a published DNS record format should require standards action. But I was discouraged from pursuing this further.

I think if everybody is doing the same thing would be good enough...

Quoted 8 lines

I think it's important to ask in what cases will the ID mapping domain be different than the system's DNS domain name, and is there a preferable mechanism for determining the ID mapping domain in those cases? Knowing more about how your customer plans to use this feature would help us discuss this more fully.

This would help me here at Red Hat. I live on at (eat your own dog food) test network that has its own DNS

Quoted 5 lines

So [email protected] maps into a valid id/gid but [email protected] does not so I need to add a Domain=redhat.com in /etc/idmapd.conf to get v4 working. Having the domain in our test DNS would work out well.

So your security realm is redhat.com. Any way to discover that fact, either at system install time, or after every boot, or ... ?

I think the ID mapping domain name only matters when you are using Kerberos? sec=sys should use only stringified UIDs.

Quoted 11 lines

Also, the person that is asking for this is probably moving from a Solaris env to Linx env... That's just a guess.

Quoted 7 lines

I've also proposed the ability to set the ID mapping domain via a command line tool like nfsidmap. But I never got past the difficulties of parsing and updating the /etc/idmapd.conf file. It makes sense to add an API to libnfsidmap for setting the system's ID mapping domain name.

Quoted 8 lines

Does having the domain in DNS help with this? I'm thinking not...

Quoted 3 lines

How would "nfsidmap -d" work if the ID mapping domain was set via DNS?

I guess we would have to teach nfs4_get_default_domain() to check DNS like nfs4_init_name_mapping() would.

Or both functions could use common infrastructure or a cached value.

Quoted 5 lines
Quoted 2 lines

Would the DNS-derived ID domain name be cached somewhere?

Currently its stored in the global default_domain variable in libnfsidmap... I think its a good place for it to live.

That means every time an application loads libnfsidmap, it has to retrieve the ID mapping domain from DNS again?

What if you built a small tool that just set the Domain value in /etc/idmapd.conf during system startup?

  $ nfsidmap --txt

could retrieve it and display it,

  # nfsidmap --txt -s

could retrieve it and update idmapd.conf if there was a TXT record retrieved, for example.

Then the rest of the infrastructure would not have to change. Just a thought!

--
Chuck Lever

#5 lore raw
Quoted 5 lines · Chuck Lever

So your security realm is redhat.com. Any way to discover that fact, either at system install time, or after every boot, or ... ?

Yea... put it DNS ;-) But I think the answer is no... at least I don't know of a way.

Quoted 4 lines

I think the ID mapping domain name only matters when you are using Kerberos? sec=sys should use only stringified UIDs.

Netapp filers still use name@domain strings and probably Solaris servers... I think only Linux use the stringified UIDs.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

How would "nfsidmap -d" work if the ID mapping
domain was set via DNS?

I guess we would have to teach nfs4_get_default_domain() to check DNS like nfs4_init_name_mapping() would.

Or both functions could use common infrastructure or a cached value.

Yeah.. we could make domain_from_dns() a bit smarter...

Quoted 11 lines
Quoted 7 lines
Quoted 4 lines

Would the DNS-derived ID domain name be cached
somewhere?

Currently its stored in the global default_domain variable in libnfsidmap... I think its a good place for it to live.

That means every time an application loads libnfsidmap, it has to retrieve the ID mapping domain from DNS again?

Yeah... which I didn't think it was a big deal with rpc.idmap since its only started once... but maybe that's not the best solution for every nfsidmap upcall, although the uid/gids are cached maybe its not so bad.

Quoted 4 lines

What if you built a small tool that just set the Domain value in /etc/idmapd.conf during system startup?

I would hate to change something an admin has set. I'm thinking if Domain is set in /etc/idmapd.conf that override everything, including DNS.

Quoted 9 lines
  $ nfsidmap --txt

could retrieve it and display it,

  # nfsidmap --txt -s

could retrieve it and update idmapd.conf if there was a TXT record retrieved, for example.

I see what you are trying to do here... instead of rewriting idmapd.conf... we should probably uses... the system that shall go nameless... systemd! ;-)

systemd could run the nfsidmap --txt command that would create a file under /run, which is managed by the systemd-tmpfiles package. rpcbind does something similar to manage its warmstart up files.

Then we could point rpc.idmap and nfsidmap to that runtime file via the libnfsidmap interfaces.

The problem with this is how do we expire this cache? We would have to store the TTL to know when its time to ping DNS again... Is the TTL returned in the DNS query?

Quoted 3 lines

Then the rest of the infrastructure would not have to change. Just a thought!

yeah we probably should cache but it does add a lot of complexity... Doesn't DNS cache things internally? If so, would using that cache work?

steved.

#6 lore raw
Quoted 15 lines · Steve Dickson
Quoted 5 lines · Chuck Lever

So your security realm is redhat.com. Any way to discover that fact, either at system install time, or after every boot, or ... ?

Yea... put it DNS ;-) But I think the answer is no... at least I don't know of a way.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I think the ID mapping domain name only matters when you are using Kerberos? sec=sys should use only stringified UIDs.

Netapp filers still use name@domain strings and probably Solaris servers... I think only Linux use the stringified UIDs.

I'm pretty sure recent Solaris servers will behave like Linux. But there's plenty of S10 out there.

Quoted 27 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

How would "nfsidmap -d" work if the ID mapping
domain was set via DNS?

I guess we would have to teach nfs4_get_default_domain() to check DNS like nfs4_init_name_mapping() would.

Or both functions could use common infrastructure or a cached value.

Yeah.. we could make domain_from_dns() a bit smarter...

Quoted 11 lines
Quoted 7 lines
Quoted 4 lines

Would the DNS-derived ID domain name be cached
somewhere?

Currently its stored in the global default_domain variable in libnfsidmap... I think its a good place for it to live.

That means every time an application loads libnfsidmap, it has to retrieve the ID mapping domain from DNS again?

Yeah... which I didn't think it was a big deal with rpc.idmap since its only started once... but maybe that's not the best solution for every nfsidmap upcall, although the uid/gids are cached maybe its not so bad.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

What if you built a small tool that just set the Domain value in /etc/idmapd.conf during system startup?

I would hate to change something an admin has set. I'm thinking if Domain is set in /etc/idmapd.conf that override everything, including DNS.

Fair enough, there should be a way to override the TXT value.

Quoted 12 lines
Quoted 8 lines
 $ nfsidmap --txt

could retrieve it and display it,

 # nfsidmap --txt -s

could retrieve it and update idmapd.conf if there was a TXT record retrieved, for example.

I see what you are trying to do here... instead of rewriting idmapd.conf... we should probably uses... the system that shall go nameless... systemd! ;-)

Quoted 7 lines

systemd could run the nfsidmap --txt command that would create a file under /run, which is managed by the systemd-tmpfiles package. rpcbind does something similar to manage its warmstart up files.

Then we could point rpc.idmap and nfsidmap to that runtime file via the libnfsidmap interfaces.

Or provide a setting in /etc/idmapd.conf which is the pathname of the /run file.

It's a little nicer if these settings were all in one place instead of split between /etc/sysconfig, systemd configuration, and idmapd.conf.

No Domain= setting means:
1. use the contents of the /run file
2. if no /run file exists, or it's empty, use the current mechanism to determine the ID mapping domain name

How does hostnamectl work? does it use /run files?

Quoted 4 lines

The problem with this is how do we expire this cache? We would have to store the TTL to know when its time to ping DNS again... Is the TTL returned in the DNS query?

I'm not aware of any required caching semantics (again, no real standard here).

I wouldn't expect this setting to change very often. Perhaps once per boot, or once per system wake-up, or whenever there is a network configuration change, is good enough. My guess is you don't want this changing arbitrarily with running users on the system. So maybe once per boot is the right answer.

"nfsidmap --txt -s" could force a refresh by hand.

(Also we need to figure out how to break a tie on multi-homed systems where more than one TXT record is found; maybe the only thing to do in that case is use Domain= , but you'd kind of prefer good behavior without needing a manual setting).

Quoted 5 lines
Quoted 2 lines

Then the rest of the infrastructure would not have to change. Just a thought!

yeah we probably should cache but it does add a lot of complexity... Doesn't DNS cache things internally? If so, would using that cache work?

I think it's the same arrangement. The resolver's cache is process-local.

--
Chuck Lever

#7 lore raw
Quoted 18 lines · Chuck Lever
Quoted 16 lines · Steve Dickson
Quoted 5 lines · Chuck Lever

So your security realm is redhat.com. Any way to discover that fact, either at system install time, or after every boot, or ... ?

Yea... put it DNS ;-) But I think the answer is no... at least I don't know of a way.

Quoted 1 line
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

I think the ID mapping domain name only matters when you are using Kerberos? sec=sys should use only stringified UIDs.

Netapp filers still use name@domain strings and probably Solaris servers... I think only Linux use the stringified UIDs.

C-mode uses stringified UIDs. Not so sure about 7-mode.

Primary Data uses stringified UIDs.

Quoted 3 lines

I'm pretty sure recent Solaris servers will behave like Linux. But there's plenty of S10 out there.

#8 lore raw

----- Original Message -----

Quoted 26 lines

From: "Thomas Haynes" <[email protected]>
To: "Chuck Lever" <[email protected]>
Cc: "Steve Dickson" <[email protected]>, "Linux NFS Mailing List" <[email protected]>
Sent: Tuesday, May 24, 2016 9:34:28 PM
Subject: Re: [RFC PATCH 0/1] Create a DNS SRV record of the ID mapping domain

Quoted 20 lines · Chuck Lever
Quoted 19 lines · Steve Dickson
Quoted 5 lines · Chuck Lever

So your security realm is redhat.com. Any way to discover that fact, either at system install time, or after every boot, or ... ?

Yea... put it DNS ;-) But I think the answer is no... at least I don't know of a way.

Quoted 4 lines

I think the ID mapping domain name only matters when you are using Kerberos? sec=sys should use only stringified UIDs.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Netapp filers still use name@domain strings and probably Solaris servers... I think only Linux use the stringified UIDs.

C-mode uses stringified UIDs. Not so sure about 7-mode.

Primary Data uses stringified UIDs.

dCache server accepts stringified UIDs and returns name@domain when possible.

A SRV record will help with auto configuration as our nfsv4 domain and dns domain are different (long story).

Tigran.

Quoted 11 lines
Quoted 5 lines

I'm pretty sure recent Solaris servers will behave like Linux. But there's plenty of S10 out there.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
In reply to Chuck Lever
Quoted 17 lines · Chuck Lever
Quoted 17 lines
Quoted 17 lines
 $ nfsidmap --txt
Quoted 7 lines
Quoted 7 lines

could retrieve it and display it,

 # nfsidmap --txt -s

could retrieve it and update idmapd.conf if
there was a TXT record retrieved, for example.

I see what you are trying to do here... instead of rewriting idmapd.conf... we should probably uses... the system that shall go nameless... systemd! ;-)

systemd could run the nfsidmap --txt command that would create a file under /run, which is managed by the systemd-tmpfiles package. rpcbind does something similar to manage its warmstart up files.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Then we could point rpc.idmap and nfsidmap to that runtime file via the libnfsidmap interfaces.

Or provide a setting in /etc/idmapd.conf which is the pathname of the /run file.

It's a little nicer if these settings were all in one place instead of split between /etc/sysconfig, systemd configuration, and idmapd.conf.hostnamectl

I agree... but... we are dealing with systemd which limits your options when it comes to reading in configuration files.

Quoted 6 lines

No Domain= setting means:
1. use the contents of the /run file
2. if no /run file exists, or it's empty, use the current mechanism to determine the ID mapping domain name

Right... but changing the name of the /run file really does not have to changeable, IMHO...

Quoted 2 lines

How does hostnamectl work? does it use /run files?

Taking a quick look it appears not to... I see a lot of dbus code... It does not look too interesting to me.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

The problem with this is how do we expire this cache? We would have to store the TTL to know when its time to ping DNS again... Is the TTL returned in the DNS query?

I'm not aware of any required caching semantics (again, no real standard here).

Quoted 7 lines

I wouldn't expect this setting to change very often. Perhaps once per boot, or once per system wake-up, or whenever there is a network configuration change, is good enough. My guess is you don't want this changing arbitrarily with running users on the system. So maybe once per boot is the right answer.

Fine... we can deal with expiring the cache if it becomes an issue...

Quoted 2 lines

"nfsidmap --txt -s" could force a refresh by hand.

True.

Quoted 7 lines

(Also we need to figure out how to break a tie on multi-homed systems where more than one TXT record is found; maybe the only thing to do in that case is use Domain= , but you'd kind of prefer good behavior without needing a manual setting).

Does that even work? How can you have multiple domains on the same host?

I would say we document the fact the first TXT record processed is the one we go with. All others are ignored.

steved.

#10 lore raw
Quoted 36 lines · Steve Dickson
Quoted 17 lines · Chuck Lever
Quoted 17 lines
Quoted 17 lines
$ nfsidmap --txt
Quoted 7 lines
Quoted 7 lines

could retrieve it and display it,

# nfsidmap --txt -s

could retrieve it and update idmapd.conf if
there was a TXT record retrieved, for example.

I see what you are trying to do here... instead of rewriting idmapd.conf... we should probably uses... the system that shall go nameless... systemd! ;-)

systemd could run the nfsidmap --txt command that would create a file under /run, which is managed by the systemd-tmpfiles package. rpcbind does something similar to manage its warmstart up files.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Then we could point rpc.idmap and nfsidmap to that runtime file via the libnfsidmap interfaces.

Or provide a setting in /etc/idmapd.conf which is the pathname of the /run file.

It's a little nicer if these settings were all in one place instead of split between /etc/sysconfig, systemd configuration, and idmapd.conf.hostnamectl

I agree... but... we are dealing with systemd which limits your options when it comes to reading in configuration files.

Quoted 1 line
Quoted 7 lines
Quoted 5 lines

No Domain= setting means:
1. use the contents of the /run file
2. if no /run file exists, or it's empty, use the current mechanism to determine the ID mapping domain name

Right... but changing the name of the /run file really does not have to changeable, IMHO...

Are /run files in the same place for every distribution? If so, then I agree.

Quoted 8 lines
Quoted 6 lines

(Also we need to figure out how to break a tie on multi-homed systems where more than one TXT record is found; maybe the only thing to do in that case is use Domain= , but you'd kind of prefer good behavior without needing a manual setting).

Does that even work? How can you have multiple domains on the same host?

Which interface is used for the TXT record query? If a system is on multiple networks with their own DNS services, it is possible for them to see a different TXT lookup result depending on which interfaces happen to be up when the query is done, and what DNS service has been set up by DHCP.

Quoted 2 lines

I would say we document the fact the first TXT record processed is the one we go with. All others are ignored.

Can that value be guaranteed to be the same after every boot, even in the face of things like changing order of interface bring-up and DHCP?

The problem with "first TXT record processed" is that the order these records are processed can change, and thus the ID mapping domain name is potentially different after every boot.

I think none of the automated mechanisms are 100% reliable in this scenario, so the best that can be done is to use the Domain setting in idmapd.conf. But admins generally ignore this and hilarity ensues.

It may not be possible to solve it, but at least we should provide tools for tracking down the issue if it should occur. Maybe start by reporting the system's ID mapping domain setting in the system log at boot time, and how it was derived.

--
Chuck Lever

#11 lore raw
Quoted 6 lines · Chuck Lever
Quoted 4 lines · Steve Dickson

Does that even work? How can you have multiple domains on the same host?

Which interface is used for the TXT record query?

I'm assuming the interfaces in /etc/resolv.conf

Quoted 5 lines

If a system is on multiple networks with their own DNS services, it is possible for them to see a different TXT lookup result depending on which interfaces happen to be up when the query is done, and what DNS service has been set up by DHCP.

#12 lore raw
Quoted 13 lines · Steve Dickson
Quoted 6 lines · Chuck Lever
Quoted 4 lines · Steve Dickson

Does that even work? How can you have multiple domains on the same host?

Which interface is used for the TXT record query?

I'm assuming the interfaces in /etc/resolv.conf

The DHCP client can change /etc/resolv.conf.

Quoted 14 lines
Quoted 5 lines

If a system is on multiple networks with their own DNS services, it is possible for them to see a different TXT lookup result depending on which interfaces happen to be up when the query is done, and what DNS service has been set up by DHCP.

From my understand of the BIND api, which is very limited, domain names and field names are use to do lookups. Not interfaces.

Quoted 5 lines
Quoted 4 lines

I would say we document the fact the first TXT record processed is the one we go with. All others are ignored.

Quoted 6 lines
Quoted 3 lines

Can that value be guaranteed to be the same after every boot, even in the face of things like changing order of interface bring-up and DHCP?

none... we are asking for a TXT record called _nfsv4idmapdomain for from a particular domain. why would we care what interface it comes from?

The order in which interfaces initialize may control the contents of /etc/resolv.conf.

Quoted 10 lines
Quoted 10 lines

The problem with "first TXT record processed" is that the order these records are processed can change, and thus the ID mapping domain name is potentially different after every boot.

I think none of the automated mechanisms are 100% reliable in this scenario, so the best that can be done is to use the Domain setting in idmapd.conf. But admins generally ignore this and hilarity ensues.

Quoted 7 lines
Quoted 5 lines

It may not be possible to solve it, but at least we should provide tools for tracking down the issue if it should occur. Maybe start by reporting the system's ID mapping domain setting in the system log at boot time, and how it was derived.

I think this is a phase two thing... Lets the the core up and working and then go from there.

Fair enough, but adding a log entry seems like
it is simple enough to do as part of phase one.

--
Chuck Lever