Comments (9)
I am seeing the behavior with uclibc and glibc on a Google Kubernetes instance.
Shouldn't nslookup return with 1 as well if the lookup failed?
I stumbled upon the problem when playing with init containers as described in the Kubernetes documentation: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
Due to this issue, the examples in the documentation do not work at all.
from busybox.
From what I can tell, the new resolver in BusyBox's nslookup
doesn't support DNS search domains at all, which seems like a pretty hefty regression.
from busybox.
I can't seem to reproduce with any of our three variants. 😞
$ docker network create test
32024cd09daca748f8254468f4f00893afc2e1173c378919b1f378ed719f1618
$ docker run -dit --name nginx --network test nginx:alpine
7feaf1f0b4f3d421603bbb984854b753c7cbc6b581dd0a304d3b8fccf8c6604b
$ docker run -it --rm --network test busybox:uclibc nslookup nginx
Server: 127.0.0.11
Address 1: 127.0.0.11
Name: nginx
Address 1: 172.22.0.2 nginx.test
$ docker run -it --rm --network test busybox:glibc nslookup nginx
Server: 127.0.0.11
Address 1: 127.0.0.11
Name: nginx
Address 1: 172.22.0.2 nginx.test
$ docker run -it --rm --network test busybox:musl nslookup nginx
nslookup: can't resolve '(null)'
Name: nginx
Address 1: 172.22.0.2 nginx.test
from busybox.
Thank you, tianon
With busybox:glibc, I can resolve the short name too:
$ kubectl exec busybox1 -- nslookup kubernetes
Server: 192.168.192.10
Address 1: 192.168.192.10 kube-dns.kube-system.svc.cluster.local
Name: kubernetes
Address 1: 192.168.192.1 kubernetes.default.svc.cluster.local
busybox1 is based on busybox:glibc
With busybox:lastest, I can't
$ kubectl exec busybox -- nslookup kubernetes
nslookup: can't resolve 'kubernetes'
Server: 192.168.192.10
Address 1: 192.168.192.10 kube-dns.kube-system.svc.cluster.local
busybox is based on busybox:latest
from busybox.
Ah, it's not specific to short names, but DNS search paths; here's a better example for reproducing:
$ docker network create --internal test
66b1bf0bf05cec6d32c171cc601b6ee160bb94de670b0c61a0a15ae267302d06
$ docker run -dit --name nginx.domain --network test nginx:alpine
448e9b11cfb336464494c615be81db3058431f623eb9416507f5f46e19b2455c
$ docker run -it --rm --network test --dns-search domain busybox:glibc nslookup nginx
Server: 127.0.0.11
Address 1: 127.0.0.11
Name: nginx
Address 1: 172.22.0.2 nginx.domain.test
$ docker run -it --rm --network test --dns-search domain busybox:uclibc nslookup nginx
Server: 127.0.0.11
Address 1: 127.0.0.11
nslookup: can't resolve 'nginx'
$ docker run -it --rm --network test --dns-search domain busybox:musl nslookup nginx
nslookup: can't resolve '(null)'
nslookup: can't resolve 'nginx'
(busybox:uclibc
is busybox:latest
)
😞
Not sure where to start digging on this one. 😕
from busybox.
The implementation is broken with non-glibc, reportedly due to fiddling with its internals: https://dev.openwrt.org/ticket/18333 and https://bugs.busybox.net/show_bug.cgi?id=675
from busybox.
Seems only uclibc is broken now
$ docker network create --internal test
d0f3b32461787a7d830cb7f73504db08a563dddbe1a93079bcd7b4034f7736de
$ docker run -dit --name nginx --network test nginx:alpine
bb795c7ddcee2043f1e4c6ce41d292af6e8497c29e80777f267864145052b345
$ docker run -it --rm --network test --dns-search domain busybox:glibc nslookup nginx
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer:
Non-authoritative answer:
Name: nginx
Address: 172.22.0.2
$ docker run -it --rm --network test --dns-search domain busybox:uclibc nslookup nginx
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer:
*** Can't find nginx: No answer
$ docker run -it --rm --network test --dns-search domain busybox:musl nslookup nginx
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer:
Non-authoritative answer:
Name: nginx
Address: 172.22.0.2
from busybox.
How does this relate to #48? Are they the same issue?
from busybox.
(See https://bugs.busybox.net/show_bug.cgi?id=11161 for where this is filed upstream.)
I'm going to close this in favor of #48, where there's been slightly more recent discussion. 👍
from busybox.
Related Issues (20)
- nc: bad port spec 'local:/...' HOT 4
- ping: bad address, Running in k8s. HOT 3
- busybox 1.34.1 exited in arm64 with code 139 HOT 5
- busybox
- The latest busybox becomes compiled dynamic? HOT 12
- Symlink /usr/bin to /bin HOT 1
- wget Connection reset by peer HOT 12
- BR2_cortex_a15 support available? HOT 1
- Can this docker with glibc support Dynamic linked binaries/ELF. HOT 3
- busybox 1.36 sha256sum crashes with Illegal instruction (SIGILL) on amd64 HOT 3
- busybox doesn't support bash HOT 1
- :confused: `busybox` is just a collection of tools, so depending on what you are running it may or may not respond to a `SIGTERM`. There isn't anything we could do in the image for that.
- Consider single (standalone) applets variants HOT 2
- How to use with an SPA HOT 3
- Zip utility in Busybox HOT 1
- confused by for loop HOT 5
- How to Set System Locales in busybox docker image? HOT 3
- busybox 1.36.1 may have been built with an older version of build tool HOT 2
- Manifest issues for 7 architectures on versions 1.35 and 1.36 HOT 2
- TLS error from peer (alert code 40) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from busybox.