Live data from Hacker News

DNS resolution issue in Alpine Linux (2021)

christoph.luppri.ch

1–10 of 61 posts

Re: DNS resolution issue in Alpine Linux (2021)

#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 doing --- but TCP DNS seems like a basic necessity for DNS to work at all.

What's holding this up? TCP DNS is just UDP DNS, but over a TCP connection, with the packet length sent before the packet itself. It's the simplest thing you could possibly come up with to make TCP DNS work. It's been there since the 1980s. They should add it.

Re: DNS resolution issue in Alpine Linux (2021)

#5
post #3
post #2

TLDR: The solution to an intentionally broken resolver is to use a third party library.

Its only broken if you dont consider robustness a feature.

It's not just "robustness". Not supporting TCP DNS breaks DNS if your responses are "large", for values of "large" that include numbers that are in fact very small.

Re: DNS resolution issue in Alpine Linux (2021)

#6
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 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 glibc, you're on your own". For me, the fact that Alpine ignored this and compiled against musl anyway, was a big red flag. (And yes I raised some of these as bug reports, but the cases got closed and nothing done about it).

Re: DNS resolution issue in Alpine Linux (2021)

#7
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…

Possibly ask on #musl or submit a patch?

Re: DNS resolution issue in Alpine Linux (2021)

#8
post #5
post #3

Earlier quoted context omitted.

Its only broken if you dont consider robustness a feature.

It's not just "robustness". Not supporting TCP DNS breaks DNS if your responses are "large", for values of "large" that include numbers that are in fact very small.

largest safe size to use is ~548 bytes - anything more than that and you need tcp

Re: DNS resolution issue in Alpine Linux (2021)

#9
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…

Possibly ask on #musl or submit a patch?

They know about it! I could write the patch, but they're not going to accept it; there's something weird going on about this.

Re: DNS resolution issue in Alpine Linux (2021)

#10

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…

"you're on your own" is like, the expected thing when you are doing something different.

Still, Alpine is on top of everyone else when it comes to Docker Images sizes. Thats why it will stick.

Post reply on HN