Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

use a single, small image for all smoke test containers #985

Closed
rade opened this issue Jun 23, 2015 · 14 comments
Closed

use a single, small image for all smoke test containers #985

rade opened this issue Jun 23, 2015 · 14 comments

Comments

@rade
Copy link
Member

rade commented Jun 23, 2015

Our smoke tests currently use two images: gliderlabs/alpine and aanand/docker-dnsutils. The former is tiny. The latter is huge. There is reason for having the latter, but I don't remember what it is. @inercia do you? Is there any way we can either a) change the tests to just use the former, or b) build a derived image off gliderlabs/alpine that has what we need?

@inercia
Copy link
Contributor

inercia commented Jun 23, 2015

I remember the reason for having the dnsutils, but not the alpine...

@rade
Copy link
Member Author

rade commented Jun 23, 2015

well, we use alpine because it is small. What's the reason for dnsutils?

@rade
Copy link
Member Author

rade commented Jun 23, 2015

Here's one reason...

$ ./280_with_or_without_dns_test.sh 
With or without DNS test
680b980a679bacec00622c75670742b8fd2f013e40414c10d44b9209b2a9d8ae
907333a83c04154c689dd352835b07ebfdc2f8544768cb621f23f6c00671f1c7
577927d034c452c5ae1a3a407f40eda0fc0bd2002d07c901acd5856a516d71a7
test #6 "exec_on 192.168.48.11 286b53e7d443a23ce311889fe27d2a09cf932080c0ce936aa2b6408f75de8a82 getent hosts 10.2.0.78 | tr -s ' '" failed:
    expected "10.2.0.78 seetwo.weave.local"
    got "10.2.0.78 seetwo.weave.local seetwo.weave.local"
test #8 "exec_on 192.168.48.11 60df56344c189fef4dde9b7b84669ae875ba6ca452d4b6035c825f9946bd5386 getent hosts 10.2.0.78 | tr -s ' '" failed:
    expected "10.2.0.78 seetwo.weave.local"
    got "10.2.0.78 seetwo.weave.local seetwo.weave.local"
2 of 8 tests failed in 48.236s.

@inercia
Copy link
Contributor

inercia commented Jun 23, 2015

The dnsutils is basically a ubuntu with dig and nslookup. I guess alpine has those tools too, so I don't know why this image was introduced...

@rade
Copy link
Member Author

rade commented Jun 23, 2015

Here's another...

$ ./635_proxy_dns_unqualified_test.sh 
Resolve unqualified names
4480a0f67489b3790410d24dacd2eceacc6c440b7d1b9a0c978a17c02ece8cb0
c50bffa454cd848200f13bc7679029b9593d89c5e2cc3b6ab1ceb9ca743f3b17
f5a17567a35cbb17f96e68c66f7f5a740e69d4527e24660b83dfad52043373d9
6d6cd06bb5bcaa2945692af68d7f1f0ad9debfd5d0e9573fc171ee073b30a087
d1b98d98165f5606de451b9e4c8c952d09e083bd70523eb7ff0772343b4c68ae
test #1 "proxy exec_on 192.168.48.11 c2 getent hosts seeone | tr -s ' '" failed:
    expected "10.2.0.78 seeone.weave.local"
    got nothing
test #2 "proxy exec_on 192.168.48.11 c3 getent hosts seeone | tr -s ' '" failed:
    expected "10.2.0.78 seeone.weave.local"
    got nothing
test #3 "proxy exec_on 192.168.48.11 6b299b6a52543bdad0c96b5be0272d02afa98688e3e696a797a35aae6d533909 getent hosts seeone | tr -s ' '" failed:
    expected "10.2.0.78 seeone.weave.local"
    got nothing
3 of 3 tests failed in 12.580s.

@inercia inercia self-assigned this Jun 23, 2015
@rade
Copy link
Member Author

rade commented Jun 23, 2015

Both of these look like bugs in the alpine name resolution. The first one would be relatively easy to paper over, even in a portable way, in the tests. The second one is more tricky.

@rade
Copy link
Member Author

rade commented Jun 23, 2015

Another one...

$ ./200_dns_test.sh 
Resolve names on a single host
9eb0ff6f3281cf845734beba36f77218ce9f6adae7f2bd3287d840c112262ca6
b73fb2005c295751235b7ed708ad082090e0a90b1fe63a93a624ebf8e8c5a873
e42cba2cb1f379b11971d3d47527c107d1eb55df48f890fbcba54d4e1bf8fa32
test #2 "exec_on 192.168.48.11 c1 getent hosts 10.2.0.34 | tr -s ' '" failed:
    expected "10.2.0.34 seetwo.weave.local"
    got "10.2.0.34 seetwo.weave.local seetwo.weave.local"
test #3 "exec_on 192.168.48.11 c1 dig MX seetwo.weave.local | grep -q 'status: NXDOMAIN'" failed:
    program terminated with code 1 instead of 0
2 of 3 tests failed in 12.394s.

That's just a missing dig.

@rade
Copy link
Member Author

rade commented Jun 23, 2015

Another one...

$ ./290_dns_fallback_test.sh 
Resolve a non-weave address
4d7c9e80fd3e322ddbfd0d21c6d38dac830f12793cd9acc5d011ba4c921e4e61
0f1debb4c25ccbe2e4d437abf403471e182ff6e4bac7d43e245d786a409773bf
test #1 "exec_on 192.168.48.11 c1 host -t mx weave.works | grep google" failed:
    program terminated with code 1 instead of 0
1 of 2 tests failed in 9.065s.

which is due to missing host.

@inercia
Copy link
Contributor

inercia commented Jun 23, 2015

So it seems there are many commands missing and probably some things broken in the resolution library... what should we do then?

@bboreham
Copy link
Contributor

Previous discussion here: #345

@rade
Copy link
Member Author

rade commented Jun 23, 2015

The broken unqualified name resolution is due to a missing feature in musl :( See also gliderlabs/docker-alpine#8. One way around that might be to change our dns to resolve unqualified names in the weavedns domain. Good idea or bad?

@rade
Copy link
Member Author

rade commented Jun 23, 2015

One way around that might be to change our dns to resolve unqualified names in the weavedns domain. Good idea or bad?

That would rather defeat the purpose of the test, which is supposed to check that weave configures resolv.conf correctly s.t. unqualified names get resolved as intended. We can't really test that with a broken resolver.

@rade
Copy link
Member Author

rade commented Jun 23, 2015

missing host

We used to use dig here, so could revert to that.

@rade rade added this to the n/a milestone Jun 23, 2015
@rade
Copy link
Member Author

rade commented Jun 23, 2015

We can't really test that with a broken resolver.

Which means we can't use images derived from musl. Anything else is going to be huge in comparison. Yes, we could find something smaller than aanand/dnsutil, but not by orders of magnitude.

-> wontfix.

@rade rade closed this as completed Jun 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants