public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Carlos O'Donell <carlos@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 0/2] Fix nss/tst-nss-files-hosts-long on single-stack hosts (bug 24816)
Date: Thu, 15 Sep 2022 14:37:58 +0200	[thread overview]
Message-ID: <87illoke3d.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <YyJVAs3wvG5fma96@fedora> (Carlos O'Donell's message of "Wed, 14 Sep 2022 18:26:10 -0400")

* Carlos O'Donell:

> On Wed, Sep 14, 2022 at 11:54:47AM +0200, Florian Weimer wrote:
>> * Carlos O'Donell:
>> 
>> > On Tue, Sep 13, 2022 at 04:35:39PM +0200, Florian Weimer via Libc-alpha wrote:
>> >> Our Fedora builders started running the container tests (after the
>> >> switch to systemd-nspawn), and we encountered this test failure as well.
>> >> Fix this by disabling address configuration in the getent tool.
>> >
>> > Two things I'd like to discuss.
>> >
>> > (1) Change the getent default and drop AI_ADDRCONFIG.
>> >
>> > I'm hesitant to add a new option to getent as a solution to a testing
>> > problem. The documented description for getent ahosts talks only
>> > about enumerating the host entries or calling getaddrinfo with
>> > AF_UNSPEC. Could we just change the default and ignore the host
>> > configuration? This is less conservative but logically it seems to me
>> > that we could just drop AI_ADDRCONFIG, and add a --addrconfig option to
>> > get back the old behaviour. What could we possibly break?
>> 
>> I'm not sure why we would make such a backwards-incompatible change just
>> to fix a test.  It sounds even more preposterous than adding the new
>> option.
>
> I fully agree that the most backwards compatible change is to add
> an option that allows getent to operate without AI_ADDRCONFIG.
>
> What I want to explore here is: Why use AI_ADDRCONFIG at all with
> getent?

I think it dates back when it was assumed that AI_ADDRCONFIG was useful.
Back then, it looked like that if your system had IPv6 addresses
configured, it could reach the entire IPv6 Internet.

In practice, what applications should do is to get all addresses,
always, and make connections in parallel over both address families.
Filtering out addresses that are clearly unusable is just an
optimization (but glibc isn't very good at that, getting the IPv6
support status of a host the way we do it can be very expensive, or give
inaccurate results over time).

> If our collective answer is: Because that's just the way we've always
> done it and changing it would be a backwards incompatible change, then
> I'm fine with that. I just wanted to explore that a bit.

Yeah, that too.  getent ahosts is not really useful because of the
address duplication.

Thanks,
Florian


      reply	other threads:[~2022-09-15 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 14:35 Florian Weimer
2022-09-13 14:35 ` [PATCH 1/2] nss: Implement --no-addrconfig option for getent Florian Weimer
2022-09-14 22:34   ` Carlos O'Donell
2022-09-15 12:11     ` Florian Weimer
2022-09-13 14:35 ` [PATCH 2/2] nss: Fix tst-nss-files-hosts-long on single-stack hosts (bug 24816) Florian Weimer
2022-09-14 22:35   ` Carlos O'Donell
2022-09-14  9:42 ` [PATCH 0/2] Fix nss/tst-nss-files-hosts-long " Carlos O'Donell
2022-09-14  9:54   ` Florian Weimer
2022-09-14 22:26     ` Carlos O'Donell
2022-09-15 12:37       ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87illoke3d.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).