Live data from Hacker News

DNS resolution issue in Alpine Linux (2021)

christoph.luppri.ch

51–60 of 61 posts

Re: DNS resolution issue in Alpine Linux (2021)

#51

Earlier quoted context omitted.

There are a lot of tools that simply can't run distroless and adding in all the requirements is often tedious with little reward.

What are some of the tools that can't run on distroless?

Anything that relies on system libraries. This works fine for most Go apps, but can have unexpected results if you don't compile the app correctly to use Go networking and what not.

Re: DNS resolution issue in Alpine Linux (2021)

#52
post #4

We're a somewhat popular hosting provider that runs Docker containers (as VMs) for our customers and does private networking over IPv6, which expands the size of our DNS requests, and we run into this all the time with Alpine. It's kind of baffling. TCP DNS is not hard. It's part of the spec. Normally, that argument doesn't mean much to me --- lots of things are parts of specs that I think are silly and not worth doi…

You should be running a local resolver. I get where you're coming from but if you "keep running into this" you should probably stop running into this?

Re: DNS resolution issue in Alpine Linux (2021)

#53

Earlier quoted context omitted.

>The last straw for me was when I discovered packages in their package repo (some of which were well-known names) that were compiled against musl when the upstream developers quite clearly wrote in their docs that "if you compile X against anything other than libc, you're on your own". (I assume you meant "glibc", not "libc".) That's how every software works. The software developer cares about A, B, C distros at most…

> (I assume you meant "glibc", not "libc".) Yes, corrected. > The maintainer of distro D takes responsibility themselves to make the package work on D. Yeah, but Alpine are not doing that, or at least not at the time I evaluated. I got tired of finding distro supplied packages that just didn't work as expected because things broke unexpectedly because of musl.

I think its important to recognise that these are community projects -- they don't owe you anything so don't misunderstand this "responsibility" you're citing.

If something is an issue that's important to you, these things get solved when people like yourself make it known constructively with test cases or bug reports.

Re: DNS resolution issue in Alpine Linux (2021)

#54
post #52
post #4

We're a somewhat popular hosting provider that runs Docker containers (as VMs) for our customers and does private networking over IPv6, which expands the size of our DNS requests, and we run into this all the time with Alpine. It's kind of baffling. TCP DNS is not hard. It's part of the spec. Normally, that argument doesn't mean much to me --- lots of things are parts of specs that I think are silly and not worth doi…

You should be running a local resolver. I get where you're coming from but if you "keep running into this" you should probably stop running into this?

How running a resolver will fix `getaddrinfo` not using TCP ?

Re: DNS resolution issue in Alpine Linux (2021)

#55

The moment I saw Alpine Linux in the title, my first guess was "I bet this is something to do with musl libc". Briefly looking through the blog, it looks like my gut feeling was correct. A while ago I evaluated Alpine Linux. I wanted to like it, I really did, it ticked so many boxes. But time and time again, I kept on running into issues with their adoption of musl libc. The last straw for me was when I discovered pa…

There are better distros with package managers that allow multiple variations of libc to live together.

Re: DNS resolution issue in Alpine Linux (2021)

#56
We've run into DNS issues with Alpine containers at two different places I've worked at. Completely different data centers and infra.

First time it took a lot of effort to pinpoint the problem.

Second time too, since it appeared because of a non-relevant code change (which lead to slighty more DNS requests).

In both cases, a simple switch to Debian slim saved the day.

Alpine is since banned from any env I'm working in :-)

Re: DNS resolution issue in Alpine Linux (2021)

#57
post #54
post #52

Earlier quoted context omitted.

You should be running a local resolver. I get where you're coming from but if you "keep running into this" you should probably stop running into this?

How running a resolver will fix `getaddrinfo` not using TCP ?

This is why I like glibc’s approach of making the actual resolution someone else’s problem and pluggable.

Re: DNS resolution issue in Alpine Linux (2021)

#58
post #20
post #13

Earlier quoted context omitted.

I mean sure, musl should add TCP DNS. But real world networking says if your DNS response is over the limit for basic UDP DNS, a meaningful proportion of clients won't get that response. Which I guess is okish if it's a TXT for mail servers, cause mail servers probably have a reasonable DNS setup; but if you wanted to return a lot of A records or AAAA records (or A records that a provider DNS64s into AAAA records), y…

That's acceptable in the real world because virtually nobody uses IPv6, and people who run into IPv6 problems will just avoid musl.

>virtually nobody uses IPv6

Some very high percentage of mobile devices, when using mobile data, are on IPv6 and preferentially connect using IPv6. I think 80% of Meta traffic is IPv6.

Lots and lots and lots of people use IPv6.

I have to say though the BOFHesque attitude shown in this thread by a number of people has convinced me never to touch Alpine linux. I can already see exactly what sort of attitude towards users and input the developers encourage and that sort of ivory tower shit has absolutely zero appeal.

Re: DNS resolution issue in Alpine Linux (2021)

#59

Earlier quoted context omitted.

What are some of the tools that can't run on distroless?

Anything that relies on system libraries. This works fine for most Go apps, but can have unexpected results if you don't compile the app correctly to use Go networking and what not.

I see. Regarding Go, how would forget to import the Go net and http packages for your app? I would think your compilation itself would fail to begin with. Or are you referring to something else?

Re: DNS resolution issue in Alpine Linux (2021)

#60

Earlier quoted context omitted.

Anything that relies on system libraries. This works fine for most Go apps, but can have unexpected results if you don't compile the app correctly to use Go networking and what not.

I see. Regarding Go, how would forget to import the Go net and http packages for your app? I would think your compilation itself would fail to begin with. Or are you referring to something else?

In my time building Go apps in the past, you'd need to specify the netgo tag and others. Not sure if this is necessary anymore, but I can think of a few Go packages that require CGO and what not that will not work using a scratch image.
Post reply on HN