Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upprometheus links with libc.musl in the docker container #897
Comments
This comment has been minimized.
This comment has been minimized.
|
Prometheus is not compiled with If there are only upsides to it, we can certainly use it. |
This comment has been minimized.
This comment has been minimized.
|
The upside is that every lookup goes through the same (Go) code path. I haven't measured the performance and mem usage, but I think it should be OK, i.e. no worse then with my go dns. You can't get more broken dns lookups than with musl. |
This comment has been minimized.
This comment has been minimized.
|
We need to be careful WRT performance. A single Prometheus server can monitor thousands of targets and therefore create a lot of (regular, not necessarily SRV) DNS lookups. (We tickled a bug in the Go stdlib because of the lookup volume. The bug was in the way the Go stdlib interacts with the libc call, and we could have worked around it with -netgo, IIRC, but we didn't, presumably for performance reasons...) Needs to be discussed with the folks once they are back from vacation. |
This comment has been minimized.
This comment has been minimized.
|
[ Quoting notifications@github.com in "Re: [prometheus] prometheus links w..." ]
Yes, this is why you then defaulted to my go dns lib. Which would not be Whenever you do a lookup via net.LookupXXX or open a a connection to
/Miek Miek Gieben |
This comment has been minimized.
This comment has been minimized.
|
@sdurrheimer Hmm, didn't you work on using glibc again in Docker images? Was that only in your private Dockerfiles so far? |
This comment has been minimized.
This comment has been minimized.
|
(and yes, musl is completely broken with respect to DNS) |
This comment has been minimized.
This comment has been minimized.
|
The current docker image is using glibc but in the master branch (corresponding to the 0.15.0rc). The stable branch is still using the old image. |
This comment has been minimized.
This comment has been minimized.
|
Ah ok, so this issue here should resolve itself when we release 0.15.0. @miekg Sounds good? |
This comment has been minimized.
This comment has been minimized.
|
Falling back to glibc is fine. |
This comment has been minimized.
This comment has been minimized.
|
Cool, closing this here then, since it is fixed in the Dockerfile at HEAD. |
juliusv
closed this
Jul 22, 2015
This comment has been minimized.
This comment has been minimized.
|
@miekg Having a feedback if the addition of glibc in the docker image has solved your problem would be awesome. |
Project0
referenced this issue
Mar 16, 2017
Closed
Dockerfile: use busybox with glibc for better dns lookup #2502
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
miekg commentedJul 16, 2015
Alpine linux is great, but it's libc musl is pretty broken wrt to DNS lookups. When ldd-ing prometheus from the standard container I see:
Which in turn looks like it does use the libc (and the resolver) making dns lookup flaky. I also though prometheus was compiled with -netgo to bypass this issue?