linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] resolv.conf.5: Timeout does not map to resolver API calls.
@ 2016-12-05 16:09 Carlos O'Donell
       [not found] ` <42e0e498-3e74-867f-4651-e378bc0d7e34-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos O'Donell @ 2016-12-05 16:09 UTC (permalink / raw)
  To: Michael Kerrisk
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Florian Weimer

I'm posting this patch to clarify the timeout behaviour because there
have been developers who expect this timeout to mean something it is not.

The timeout (and by proxy attempts) does not map to resolver API calls.
For example a single call to getent might involve multiple resolution
requests to the resolvers listed in resolv.conf and each request will
use TIMEOUT and be attempted at least ATTEMPT times. A developer using
the resolver API cannot easily compute any given timeout because the
implementation may change e.g. A and AAAA queries made in parallel.
A system administrator uses this setting to ensure there is a desirable
timeout on any request to any of the nameservers listed in resolv.conf,
but no guarantees exist beyond that.

Patch against master.

Signed-off-by: Carlos O'Donell <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 man5/resolv.conf.5 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
index 553f093..241565d 100644
--- a/man5/resolv.conf.5
+++ b/man5/resolv.conf.5
@@ -161,7 +161,10 @@ The value for this option is silently capped to 15.
 .\" Since glibc 2.2
 Sets the amount of time the resolver will wait for a
 response from a remote name server before retrying the
-query via a different name server.
+query via a different name server. This may
+.BR not
+be the total time taken by any resolver API call and there is no
+guarantee that a single resolver API call maps to a single timeout.
 Measured in seconds,
 the default is
 .BR RES_TIMEOUT
-- 
Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [patch] resolv.conf.5: Timeout does not map to resolver API calls.
       [not found] ` <42e0e498-3e74-867f-4651-e378bc0d7e34-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-12-05 16:31   ` Florian Weimer
  2016-12-06 10:42   ` Michael Kerrisk (man-pages)
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2016-12-05 16:31 UTC (permalink / raw)
  To: Carlos O'Donell, Michael Kerrisk
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 12/05/2016 05:09 PM, Carlos O'Donell wrote:

> diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
> index 553f093..241565d 100644
> --- a/man5/resolv.conf.5
> +++ b/man5/resolv.conf.5
> @@ -161,7 +161,10 @@ The value for this option is silently capped to 15.
>  .\" Since glibc 2.2
>  Sets the amount of time the resolver will wait for a
>  response from a remote name server before retrying the
> -query via a different name server.
> +query via a different name server. This may
> +.BR not
> +be the total time taken by any resolver API call and there is no
> +guarantee that a single resolver API call maps to a single timeout.
>  Measured in seconds,
>  the default is
>  .BR RES_TIMEOUT

Looks reasonable to me.

Thanks,
Florian

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [patch] resolv.conf.5: Timeout does not map to resolver API calls.
       [not found] ` <42e0e498-3e74-867f-4651-e378bc0d7e34-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-12-05 16:31   ` Florian Weimer
@ 2016-12-06 10:42   ` Michael Kerrisk (man-pages)
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-12-06 10:42 UTC (permalink / raw)
  To: Carlos O'Donell
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Florian Weimer

On 12/05/2016 05:09 PM, Carlos O'Donell wrote:
> I'm posting this patch to clarify the timeout behaviour because there
> have been developers who expect this timeout to mean something it is not.
> 
> The timeout (and by proxy attempts) does not map to resolver API calls.
> For example a single call to getent might involve multiple resolution
> requests to the resolvers listed in resolv.conf and each request will
> use TIMEOUT and be attempted at least ATTEMPT times. A developer using
> the resolver API cannot easily compute any given timeout because the
> implementation may change e.g. A and AAAA queries made in parallel.
> A system administrator uses this setting to ensure there is a desirable
> timeout on any request to any of the nameservers listed in resolv.conf,
> but no guarantees exist beyond that.
> 
> Patch against master.

Thanks, Carlos for the patch, and thanks, Florian for the check.

Patch applied.

Cheers,

Michael

> Signed-off-by: Carlos O'Donell <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  man5/resolv.conf.5 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
> index 553f093..241565d 100644
> --- a/man5/resolv.conf.5
> +++ b/man5/resolv.conf.5
> @@ -161,7 +161,10 @@ The value for this option is silently capped to 15.
>  .\" Since glibc 2.2
>  Sets the amount of time the resolver will wait for a
>  response from a remote name server before retrying the
> -query via a different name server.
> +query via a different name server. This may
> +.BR not
> +be the total time taken by any resolver API call and there is no
> +guarantee that a single resolver API call maps to a single timeout.
>  Measured in seconds,
>  the default is
>  .BR RES_TIMEOUT
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-12-06 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 16:09 [patch] resolv.conf.5: Timeout does not map to resolver API calls Carlos O'Donell
     [not found] ` <42e0e498-3e74-867f-4651-e378bc0d7e34-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-12-05 16:31   ` Florian Weimer
2016-12-06 10:42   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).