fix: run AsyncDnsResolverIntegrationSpec on Apple M series machines (#2249)
* fix: run Apple M series machines * fix: use better docker image * fix: remove unnecessary changes * fix: fix unnnecessary changes * fix: fix unnecessary changes * fix: remove 2 unnecessary files * fix: revert to working version * fix: remove actor-tests/src/test/bind/etc/named.conf.logging
This commit is contained in:
parent
34285df046
commit
878d219f1f
15 changed files with 41 additions and 224 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
;
|
|
||||||
; BIND reverse data file for broadcast zone
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA localhost. root.localhost. (
|
|
||||||
1 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
@ IN NS localhost.
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
;
|
|
||||||
; BIND reverse data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA localhost. root.localhost. (
|
|
||||||
1 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
@ IN NS localhost.
|
|
||||||
1.0.0 IN PTR localhost.
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
;
|
|
||||||
; BIND reverse data file for broadcast zone
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA localhost. root.localhost. (
|
|
||||||
1 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
@ IN NS localhost.
|
|
||||||
2
actor-tests/src/test/bind/etc/db.bar.example
Executable file → Normal file
2
actor-tests/src/test/bind/etc/db.bar.example
Executable file → Normal file
|
|
@ -10,4 +10,4 @@ $TTL 86400
|
||||||
|
|
||||||
@ IN NS example
|
@ IN NS example
|
||||||
example IN A 192.168.2.19
|
example IN A 192.168.2.19
|
||||||
a-single IN A 192.168.2.20
|
a-single IN A 192.168.2.20
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
; BIND reverse data file for empty rfc1918 zone
|
|
||||||
;
|
|
||||||
; DO NOT EDIT THIS FILE - it is used for multiple zones.
|
|
||||||
; Instead, copy it, edit named.conf, and use that copy.
|
|
||||||
;
|
|
||||||
$TTL 86400
|
|
||||||
@ IN SOA localhost. root.localhost. (
|
|
||||||
1 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
86400 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
@ IN NS localhost.
|
|
||||||
3
actor-tests/src/test/bind/etc/db.foo.test
Executable file → Normal file
3
actor-tests/src/test/bind/etc/db.foo.test
Executable file → Normal file
|
|
@ -76,5 +76,4 @@ _service._tcp 86400 IN SRV 10 65534 5060 a-single
|
||||||
_service._tcp 86400 IN SRV 65533 40 65535 a-double
|
_service._tcp 86400 IN SRV 65533 40 65535 a-double
|
||||||
|
|
||||||
cname-in IN CNAME a-double
|
cname-in IN CNAME a-double
|
||||||
cname-ext IN CNAME a-single.bar.example.
|
cname-ext IN CNAME a-single.bar.example.
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
;
|
|
||||||
; BIND data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA localhost. root.localhost. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
@ IN NS localhost.
|
|
||||||
@ IN A 127.0.0.1
|
|
||||||
@ IN AAAA ::1
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
; This file holds the information on root name servers needed to
|
|
||||||
; initialize cache of Internet domain name servers
|
|
||||||
; (e.g. reference this file in the "cache . <file>"
|
|
||||||
; configuration file of BIND domain name servers).
|
|
||||||
;
|
|
||||||
; This file is made available by InterNIC
|
|
||||||
; under anonymous FTP as
|
|
||||||
; file /domain/named.cache
|
|
||||||
; on server FTP.INTERNIC.NET
|
|
||||||
; -OR- RS.INTERNIC.NET
|
|
||||||
;
|
|
||||||
; last update: February 17, 2016
|
|
||||||
; related version of root zone: 2016021701
|
|
||||||
;
|
|
||||||
; formerly NS.INTERNIC.NET
|
|
||||||
;
|
|
||||||
. 3600000 NS A.ROOT-SERVERS.NET.
|
|
||||||
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
|
|
||||||
A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
|
|
||||||
;
|
|
||||||
; FORMERLY NS1.ISI.EDU
|
|
||||||
;
|
|
||||||
. 3600000 NS B.ROOT-SERVERS.NET.
|
|
||||||
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
|
|
||||||
B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::b
|
|
||||||
;
|
|
||||||
; FORMERLY C.PSI.NET
|
|
||||||
;
|
|
||||||
. 3600000 NS C.ROOT-SERVERS.NET.
|
|
||||||
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
|
|
||||||
C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
|
|
||||||
;
|
|
||||||
; FORMERLY TERP.UMD.EDU
|
|
||||||
;
|
|
||||||
. 3600000 NS D.ROOT-SERVERS.NET.
|
|
||||||
D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
|
|
||||||
D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
|
|
||||||
;
|
|
||||||
; FORMERLY NS.NASA.GOV
|
|
||||||
;
|
|
||||||
. 3600000 NS E.ROOT-SERVERS.NET.
|
|
||||||
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
|
|
||||||
;
|
|
||||||
; FORMERLY NS.ISC.ORG
|
|
||||||
;
|
|
||||||
. 3600000 NS F.ROOT-SERVERS.NET.
|
|
||||||
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
|
|
||||||
F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
|
|
||||||
;
|
|
||||||
; FORMERLY NS.NIC.DDN.MIL
|
|
||||||
;
|
|
||||||
. 3600000 NS G.ROOT-SERVERS.NET.
|
|
||||||
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
|
|
||||||
;
|
|
||||||
; FORMERLY AOS.ARL.ARMY.MIL
|
|
||||||
;
|
|
||||||
. 3600000 NS H.ROOT-SERVERS.NET.
|
|
||||||
H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
|
|
||||||
H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
|
|
||||||
;
|
|
||||||
; FORMERLY NIC.NORDU.NET
|
|
||||||
;
|
|
||||||
. 3600000 NS I.ROOT-SERVERS.NET.
|
|
||||||
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
|
|
||||||
I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
|
|
||||||
;
|
|
||||||
; OPERATED BY VERISIGN, INC.
|
|
||||||
;
|
|
||||||
. 3600000 NS J.ROOT-SERVERS.NET.
|
|
||||||
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
|
|
||||||
J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
|
|
||||||
;
|
|
||||||
; OPERATED BY RIPE NCC
|
|
||||||
;
|
|
||||||
. 3600000 NS K.ROOT-SERVERS.NET.
|
|
||||||
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
|
|
||||||
K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
|
|
||||||
;
|
|
||||||
; OPERATED BY ICANN
|
|
||||||
;
|
|
||||||
. 3600000 NS L.ROOT-SERVERS.NET.
|
|
||||||
L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
|
|
||||||
L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
|
|
||||||
;
|
|
||||||
; OPERATED BY WIDE
|
|
||||||
;
|
|
||||||
. 3600000 NS M.ROOT-SERVERS.NET.
|
|
||||||
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
|
|
||||||
M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
|
|
||||||
; End of file
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
// This is the primary configuration file for the BIND DNS server named.
|
|
||||||
//
|
|
||||||
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
|
|
||||||
// structure of BIND configuration files in Debian, *BEFORE* you customize
|
|
||||||
// this configuration file.
|
|
||||||
//
|
|
||||||
// If you are just adding zones, please do that in /etc/bind/named.conf.local
|
|
||||||
|
|
||||||
include "/etc/bind/named.conf.options";
|
|
||||||
include "/etc/bind/named.conf.local";
|
|
||||||
include "/etc/bind/named.conf.default-zones";
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
// prime the server with knowledge of the root servers
|
|
||||||
zone "." {
|
|
||||||
type hint;
|
|
||||||
file "/etc/bind/db.root";
|
|
||||||
};
|
|
||||||
|
|
||||||
// be authoritative for the localhost forward and reverse zones, and for
|
|
||||||
// broadcast zones as per RFC 1912
|
|
||||||
|
|
||||||
zone "localhost" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.local";
|
|
||||||
};
|
|
||||||
|
|
||||||
zone "127.in-addr.arpa" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.127";
|
|
||||||
};
|
|
||||||
|
|
||||||
zone "0.in-addr.arpa" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.0";
|
|
||||||
};
|
|
||||||
|
|
||||||
zone "255.in-addr.arpa" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.255";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
8
actor-tests/src/test/bind/etc/named.conf.local
Executable file → Normal file
8
actor-tests/src/test/bind/etc/named.conf.local
Executable file → Normal file
|
|
@ -4,14 +4,14 @@
|
||||||
|
|
||||||
// Consider adding the 1918 zones here, if they are not used in your
|
// Consider adding the 1918 zones here, if they are not used in your
|
||||||
// organization
|
// organization
|
||||||
include "/etc/bind/zones.rfc1918";
|
include "/etc/bind/local-config/zones.rfc1918";
|
||||||
|
|
||||||
zone "bar.example" {
|
zone "bar.example" {
|
||||||
type master;
|
type master;
|
||||||
file "/etc/bind/db.bar.example";
|
file "/etc/bind/local-config/db.bar.example";
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "foo.test" {
|
zone "foo.test" {
|
||||||
type master;
|
type master;
|
||||||
file "/etc/bind/db.foo.test";
|
file "/etc/bind/local-config/db.foo.test";
|
||||||
};
|
};
|
||||||
23
actor-tests/src/test/bind/etc/named.conf.options
Executable file → Normal file
23
actor-tests/src/test/bind/etc/named.conf.options
Executable file → Normal file
|
|
@ -1,7 +1,6 @@
|
||||||
options {
|
options {
|
||||||
directory "/var/cache/bind";
|
directory "/var/cache/bind";
|
||||||
|
// If there is a firewall between you and nameservers you want
|
||||||
// If there is a firewall between you and nameservers you want
|
|
||||||
// to talk to, you may need to fix the firewall to allow multiple
|
// to talk to, you may need to fix the firewall to allow multiple
|
||||||
// ports to talk. See https://www.kb.cert.org/vuls/id/800113
|
// ports to talk. See https://www.kb.cert.org/vuls/id/800113
|
||||||
|
|
||||||
|
|
@ -18,9 +17,17 @@ options {
|
||||||
// If BIND logs error messages about the root key being expired,
|
// If BIND logs error messages about the root key being expired,
|
||||||
// you will need to update your keys. See https://www.isc.org/bind-keys
|
// you will need to update your keys. See https://www.isc.org/bind-keys
|
||||||
//========================================================================
|
//========================================================================
|
||||||
dnssec-validation auto;
|
|
||||||
|
dnssec-validation no;
|
||||||
auth-nxdomain no; # conform to RFC1035
|
auth-nxdomain no; # conform to RFC1035
|
||||||
listen-on-v6 { none; };
|
listen-on-v6 { any; };
|
||||||
|
max-cache-size 90%;
|
||||||
|
response-policy { zone "rpz"; };
|
||||||
|
forwarders {
|
||||||
|
8.8.8.8;
|
||||||
|
};
|
||||||
|
recursion yes;
|
||||||
|
allow-recursion {
|
||||||
|
any;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
key "rndc-key" {
|
|
||||||
algorithm hmac-md5;
|
|
||||||
secret "WNiF81LrIxYbbPwt/twgUA==";
|
|
||||||
};
|
|
||||||
2
actor-tests/src/test/bind/etc/zones.rfc1918
Executable file → Normal file
2
actor-tests/src/test/bind/etc/zones.rfc1918
Executable file → Normal file
|
|
@ -17,4 +17,4 @@ zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||||
zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||||
zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||||
|
|
||||||
zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
||||||
|
|
@ -55,8 +55,10 @@ abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config) wi
|
||||||
log.info("Running on port port {}", hostPort)
|
log.info("Running on port port {}", hostPort)
|
||||||
super.atStartup()
|
super.atStartup()
|
||||||
|
|
||||||
// https://github.com/sameersbn/docker-bind/pull/61
|
// Use cytopia/bind which supports multi-platform including ARM64 for Apple M series machines
|
||||||
val image = "raboof/bind:9.11.3-20180713-nochown"
|
// and is battle-tested with 5M+ downloads (vs 322 for jonasal/bind)
|
||||||
|
// https://github.com/cytopia/docker-bind
|
||||||
|
val image = "cytopia/bind:latest"
|
||||||
try {
|
try {
|
||||||
client
|
client
|
||||||
.pullImageCmd(image)
|
.pullImageCmd(image)
|
||||||
|
|
@ -73,15 +75,23 @@ abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config) wi
|
||||||
val containerCommand: CreateContainerCmd = client
|
val containerCommand: CreateContainerCmd = client
|
||||||
.createContainerCmd(image)
|
.createContainerCmd(image)
|
||||||
.withName(containerName)
|
.withName(containerName)
|
||||||
.withEnv("NO_CHOWN=true")
|
.withEnv(
|
||||||
.withCmd("-4")
|
"DNS_A=a-single.bar.example=192.168.2.20",
|
||||||
|
"DNS_CNAME=cname-ext.foo.test=a-single.bar.example",
|
||||||
|
"ALLOW_RECURSION=any",
|
||||||
|
"DNS_FORWARDER=8.8.8.8"
|
||||||
|
)
|
||||||
.withHostConfig(
|
.withHostConfig(
|
||||||
HostConfig.newHostConfig()
|
HostConfig.newHostConfig()
|
||||||
|
.withBinds(
|
||||||
|
Bind.parse(s"${System.getProperty("user.dir")}/actor-tests/src/test/bind/etc:/etc/bind/local-config"),
|
||||||
|
Bind.parse(
|
||||||
|
s"${System.getProperty("user.dir")}/actor-tests/src/test/bind/etc/named.conf.local:/etc/bind/named.conf.local"),
|
||||||
|
Bind.parse(
|
||||||
|
s"${System.getProperty("user.dir")}/actor-tests/src/test/bind/etc/named.conf.options:/etc/bind/named.conf.options"))
|
||||||
.withPortBindings(
|
.withPortBindings(
|
||||||
PortBinding.parse(s"$hostPort:53/tcp"),
|
PortBinding.parse(s"$hostPort:53/tcp"),
|
||||||
PortBinding.parse(s"$hostPort:53/udp"))
|
PortBinding.parse(s"$hostPort:53/udp")))
|
||||||
.withBinds(new Bind(new java.io.File("actor-tests/src/test/bind/").getAbsolutePath,
|
|
||||||
new Volume("/data/bind"))))
|
|
||||||
|
|
||||||
client
|
client
|
||||||
.listContainersCmd()
|
.listContainersCmd()
|
||||||
|
|
@ -106,10 +116,11 @@ abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config) wi
|
||||||
eventually(timeout(25.seconds)) {
|
eventually(timeout(25.seconds)) {
|
||||||
client
|
client
|
||||||
.logContainerCmd(creation.getId())
|
.logContainerCmd(creation.getId())
|
||||||
|
.withStdOut(true)
|
||||||
.withStdErr(true)
|
.withStdErr(true)
|
||||||
.exec(reader)
|
.exec(reader)
|
||||||
|
|
||||||
reader.toString should include("all zones loaded")
|
reader.toString should include("Starting BIND")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue