DNS: answer Go clients' SRV lookups locally and reply SERVFAIL on timeouts (#715)
Co-authored-by: Chukwuebuka (Gaus Octavio) <56232734+Chukwuebuka-2003@users.noreply.github.com>
This commit is contained in:
1 parent
ba01465c25
commit
42e3a4f88c
4 files changed
+239
-41
No files matched your search
@@ -444,14 +444,26 @@ impl Dns {
|
||||
// where another project's service has it too (#294).
|
||||
// The host's names are the host's whatever a container is called:
|
||||
// a name registered for one of them is never answered.
|
||||
let is_host = HOST_NAMES.contains(&name.as_str());
|
||||
let known = |n: &str| {
|
||||
HOST_NAMES.contains(&n)
|
||||
|| self.servers[server].bridges.iter().any(|b| self.names.get(b).is_some_and(|t| t.contains_key(n)) || self.names6.get(b).is_some_and(|t| t.contains_key(n)))
|
||||
};
|
||||
// gRPC's SRV lookup of `_grpclb._tcp.<name>` names a container on
|
||||
// this network (or the host). Answer NODATA for the service here:
|
||||
// there are no SRV records, and forwarding the query would leave
|
||||
// Go's resolver waiting for an upstream we can't rely on (#715).
|
||||
// A registered alias starting with `_` (such as `_app.web` alongside
|
||||
// `web`) is answered with its own records, not taken for a selector.
|
||||
let service = if known(&name) { None } else { service_base(&name, known) };
|
||||
let lookup = service.unwrap_or(&name);
|
||||
let is_host = HOST_NAMES.contains(&lookup);
|
||||
let bridge = self.servers[server]
|
||||
.bridges
|
||||
.iter()
|
||||
.filter(|b| !is_host && (self.names.get(*b).is_some_and(|t| t.contains_key(&name)) || self.names6.get(*b).is_some_and(|t| t.contains_key(&name))))
|
||||
.filter(|b| !is_host && (self.names.get(*b).is_some_and(|t| t.contains_key(lookup)) || self.names6.get(*b).is_some_and(|t| t.contains_key(lookup))))
|
||||
.min_by_key(|b| self.networks.get(*b).map_or(b.as_str(), String::as_str));
|
||||
let addrs = bridge.and_then(|b| self.names.get(b)).and_then(|t| t.get(&name));
|
||||
let addrs6 = bridge.and_then(|b| self.names6.get(b)).and_then(|t| t.get(&name));
|
||||
let addrs = bridge.and_then(|b| self.names.get(b)).and_then(|t| t.get(lookup));
|
||||
let addrs6 = bridge.and_then(|b| self.names6.get(b)).and_then(|t| t.get(lookup));
|
||||
// The host's names answer A with the host's address, and AAAA with
|
||||
// no records: the host relay is IPv4 only.
|
||||
let addrs = match addrs {
|
||||
@@ -463,8 +475,11 @@ impl Dns {
|
||||
if addrs.is_none() && addrs6.is_none() {
|
||||
return None;
|
||||
}
|
||||
let a: &[[u8; 4]] = if qtype == 1 || qtype == 255 { addrs.map_or(&[], Vec::as_slice) } else { &[] };
|
||||
let aaaa: &[([u8; 4], [u8; 16])] = if qtype == 28 || qtype == 255 { addrs6.map_or(&[], Vec::as_slice) } else { &[] };
|
||||
// A service name has no records of its own: the container it
|
||||
// belongs to has the addresses, and the caller looks those up by
|
||||
// the container's name.
|
||||
let a: &[[u8; 4]] = if service.is_none() && (qtype == 1 || qtype == 255) { addrs.map_or(&[], Vec::as_slice) } else { &[] };
|
||||
let aaaa: &[([u8; 4], [u8; 16])] = if service.is_none() && (qtype == 28 || qtype == 255) { addrs6.map_or(&[], Vec::as_slice) } else { &[] };
|
||||
let mut r = Vec::with_capacity(end + 16 * a.len() + 28 * aaaa.len());
|
||||
r.extend_from_slice(&q[0..2]); // id
|
||||
r.extend_from_slice(&[0x81, 0x80]); // response, recursion desired + available
|
||||
@@ -489,14 +504,15 @@ impl Dns {
|
||||
|
||||
fn forward(&mut self, server: usize, q: &[u8], client: libc::sockaddr_in, upstream: &[[u8; 4]]) {
|
||||
let now = Instant::now();
|
||||
// A query with the container's own servers past its deadline is
|
||||
// answered SERVFAIL here too, before the slots are counted.
|
||||
// A query past its deadline is answered SERVFAIL here too, before
|
||||
// the slots are counted: `on_readable` runs before `on_timer`.
|
||||
for at in (0..self.pending.len()).rev() {
|
||||
if self.pending[at].own.is_some() && now.duration_since(self.pending[at].started) >= OWN_DEADLINE {
|
||||
let p = &self.pending[at];
|
||||
let (from, wait) = if p.own.is_some() { (p.started, OWN_DEADLINE) } else { (p.sent, FORWARD_TIMEOUT) };
|
||||
if now.duration_since(from) >= wait {
|
||||
self.fail(at);
|
||||
}
|
||||
}
|
||||
self.pending.retain(|p| p.own.is_some() || now.duration_since(p.sent) < FORWARD_TIMEOUT);
|
||||
let key = self.servers[server].container.map_or(client.sin_addr.s_addr.to_ne_bytes(), |(_, owner)| owner);
|
||||
let own = self.clients.get(&key).map(|v| (v.len(), v.first().copied()));
|
||||
let Some((_, _, end)) = parse_question(q) else {
|
||||
@@ -533,18 +549,17 @@ impl Dns {
|
||||
// No resolver yet, or it can't be reached: the host, if allowed.
|
||||
let (sock, relayed) = match sock {
|
||||
Some(s) => (s, false),
|
||||
None if may_relay => match self.relay_stream(&msg) {
|
||||
None => match may_relay.then(|| self.relay_stream(&msg)).flatten() {
|
||||
Some(s) => (s, true),
|
||||
None => return,
|
||||
},
|
||||
// None of its own can be sent to: SERVFAIL, not silence.
|
||||
None if own.is_some() => {
|
||||
if let Some(s) = self.servers.get(server) {
|
||||
send_to(s.sock.as_raw_fd(), &servfail(id_of(q), rd(q), &q[12..end]), &client);
|
||||
// No upstream that can be sent to and no host relay (none on
|
||||
// a Linux host, not used for `--dns`, or backing off):
|
||||
// answer at once rather than leave Go's resolver to time
|
||||
// out waiting for a reply that will never come (#715).
|
||||
None => {
|
||||
send_to(self.servers[server].sock.as_raw_fd(), &servfail(id, rd(q), &q[12..end]), &client);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
None => return,
|
||||
},
|
||||
};
|
||||
let p = Pending {
|
||||
sock,
|
||||
@@ -606,15 +621,10 @@ impl Dns {
|
||||
|
||||
/// The server a query is with can't be reached or refused: the next of
|
||||
/// the container's own, else the host if the query may go through it,
|
||||
/// else (its own servers all failed) SERVFAIL to the client.
|
||||
/// else SERVFAIL to the client.
|
||||
fn hand_over(&mut self, at: usize) {
|
||||
if self.ask_next_own(at) {
|
||||
return;
|
||||
}
|
||||
if self.pending[at].own.is_some() {
|
||||
if !self.ask_next_own(at) && !self.relay(at) {
|
||||
self.fail(at);
|
||||
} else {
|
||||
self.relay(at);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -628,9 +638,9 @@ impl Dns {
|
||||
}
|
||||
|
||||
/// Sends pending query `at` again, through the host, once.
|
||||
fn relay(&mut self, at: usize) {
|
||||
fn relay(&mut self, at: usize) -> bool {
|
||||
if !self.pending[at].may_relay {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
self.pending[at].may_relay = false;
|
||||
let query = std::mem::take(&mut self.pending[at].query);
|
||||
@@ -641,6 +651,9 @@ impl Dns {
|
||||
p.sock = stream;
|
||||
p.relayed = Some(Vec::new());
|
||||
p.sent = Instant::now();
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,13 +688,14 @@ impl Dns {
|
||||
if msg.len() >= 12 && u16::from_be_bytes([msg[0], msg[1]]) == p.our && response_matches(&msg, p) {
|
||||
self.answered(at, &mut msg);
|
||||
} else {
|
||||
self.pending.swap_remove(at);
|
||||
// A reply we can't use is still better answered than
|
||||
// dropped: the client would only wait for its timeout.
|
||||
self.fail(at);
|
||||
}
|
||||
}
|
||||
// Gone before a whole reply: the client asks again.
|
||||
None if eof => {
|
||||
self.pending.swap_remove(at);
|
||||
}
|
||||
// Gone before a whole reply: answer SERVFAIL now, as with any
|
||||
// other upstream that didn't answer (#715).
|
||||
None if eof => self.fail(at),
|
||||
None => self.pending[at].relayed = Some(got),
|
||||
}
|
||||
}
|
||||
@@ -728,7 +742,9 @@ impl Dns {
|
||||
} else if p.may_relay && now.duration_since(p.sent) >= FALLBACK_AFTER {
|
||||
self.relay(at);
|
||||
} else if now.duration_since(p.sent) >= FORWARD_TIMEOUT {
|
||||
self.pending.swap_remove(at);
|
||||
// An upstream that never answered must not leave the
|
||||
// client to hit its own timeout with no reply at all.
|
||||
self.fail(at);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -739,16 +755,17 @@ impl Dns {
|
||||
let left = |from: Instant, wait: Duration| wait.saturating_sub(now.duration_since(from));
|
||||
self.pending
|
||||
.iter()
|
||||
.filter_map(|p| {
|
||||
.map(|p| {
|
||||
let due = if p.own.is_some() {
|
||||
left(p.sent, OWN_WAIT).min(left(p.started, OWN_DEADLINE))
|
||||
} else if p.may_relay {
|
||||
left(p.sent, FALLBACK_AFTER)
|
||||
left(p.sent, FALLBACK_AFTER).min(left(p.sent, FORWARD_TIMEOUT))
|
||||
} else {
|
||||
// Swept by the next lookup (or `on_timer`), no wake-up for it.
|
||||
return None;
|
||||
// Even with no relay left, the query must be answered
|
||||
// when its timeout expires, not only on the next lookup.
|
||||
left(p.sent, FORWARD_TIMEOUT)
|
||||
};
|
||||
Some(wait_ms(due))
|
||||
wait_ms(due)
|
||||
})
|
||||
.min()
|
||||
.unwrap_or(-1)
|
||||
@@ -906,6 +923,25 @@ fn parse_question(q: &[u8]) -> Option<(String, u16, usize)> {
|
||||
Some((name, qtype, i + 4))
|
||||
}
|
||||
|
||||
/// The container (or host) name a service query is about, when every label
|
||||
/// before it is a non-empty underscore selector: gRPC looks up
|
||||
/// `_grpclb._tcp.<name>` as an SRV record before asking for the name's A
|
||||
/// records. Such a name belongs to this network, so it is answered here
|
||||
/// (NODATA) rather than forwarded to an upstream that may never answer (#715).
|
||||
fn service_base(name: &str, known: impl Fn(&str) -> bool) -> Option<&str> {
|
||||
let mut rest = name;
|
||||
while let Some((label, tail)) = rest.split_once('.') {
|
||||
if label.len() <= 1 || !label.starts_with('_') {
|
||||
return None;
|
||||
}
|
||||
if known(tail) {
|
||||
return Some(tail);
|
||||
}
|
||||
rest = tail;
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{Dns, Pending, Server, response_matches, udp_socket};
|
||||
@@ -944,6 +980,147 @@ mod tests {
|
||||
assert!(dns.servers.is_empty());
|
||||
}
|
||||
|
||||
/// #715: gRPC looks up `_grpclb._tcp.<name>` before the name's A
|
||||
/// records. The service belongs to this network, so answer NODATA
|
||||
/// instead of forwarding a query only an upstream can time out on.
|
||||
#[test]
|
||||
fn service_names_of_known_containers_are_answered_nodata() {
|
||||
let mut dns = Dns::default();
|
||||
dns.servers.push(Server { id: super::server_id(), bridges: vec!["kiri1".into()], sock: udp_socket().unwrap(), container: None });
|
||||
dns.register("kiri1", ["temporal", "api.myproj"].iter(), [10, 5, 0, 3]);
|
||||
let v6 = [0xfd, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4];
|
||||
dns.register("kiri1", ["_app.temporal"].iter(), [10, 5, 0, 4]);
|
||||
dns.register6("kiri1", ["_app.temporal"].iter(), [10, 5, 0, 4], v6);
|
||||
for name in ["_grpclb._tcp.temporal", "_http._tcp.api.myproj", "_grpclb._tcp._app.temporal", "_grpclb._tcp.host.docker.internal"] {
|
||||
for qtype in [33, 1, 28] {
|
||||
let q = query(name, qtype);
|
||||
let r = dns.answer(0, &q).unwrap_or_else(|| panic!("{name} (qtype {qtype}) is answered here, not forwarded"));
|
||||
assert_eq!((r[3] & 0x0f, answers(&r, q.len()).len()), (0, 0), "{name} (qtype {qtype}): NOERROR with no records");
|
||||
assert_eq!(&r[12..q.len()], &q[12..], "the question is echoed back");
|
||||
}
|
||||
}
|
||||
// A registered alias starting with `_` answers its own A/AAAA records, not NODATA.
|
||||
let q = query("_app.temporal", 1);
|
||||
assert_eq!(answers(&dns.answer(0, &q).unwrap(), q.len()), [(1, vec![10, 5, 0, 4])]);
|
||||
let q6 = query("_app.temporal", 28);
|
||||
assert_eq!(answers(&dns.answer(0, &q6).unwrap(), q6.len()), [(28, v6.to_vec())]);
|
||||
// A service under a name we don't know, or with a non-selector label, is forwarded.
|
||||
for unknown in ["_grpclb._tcp.other", "foo._tcp.temporal", "_.temporal", "_grpclb._.temporal"] {
|
||||
assert!(dns.answer(0, &query(unknown, 33)).is_none(), "{unknown} must not match");
|
||||
}
|
||||
}
|
||||
|
||||
/// #715: a forwarded query whose upstream never answers must get a
|
||||
/// SERVFAIL rather than being dropped, leaving Go's resolver to hit
|
||||
/// its own timeout with no reply at all from 127.0.0.11.
|
||||
#[test]
|
||||
fn a_forwarded_query_that_times_out_gets_servfail() {
|
||||
use std::os::fd::AsRawFd;
|
||||
use std::time::{Duration, Instant};
|
||||
let bind = |ip: [u8; 4]| {
|
||||
let s = udp_socket().unwrap();
|
||||
let a = super::sockaddr(ip, 0);
|
||||
assert_eq!(unsafe { libc::bind(s.as_raw_fd(), (&a as *const libc::sockaddr_in).cast(), std::mem::size_of::<libc::sockaddr_in>() as u32) }, 0, "bind");
|
||||
s
|
||||
};
|
||||
let addr = |fd: i32| {
|
||||
let mut a: libc::sockaddr_in = unsafe { std::mem::zeroed() };
|
||||
let mut len = std::mem::size_of::<libc::sockaddr_in>() as u32;
|
||||
unsafe { libc::getsockname(fd, (&mut a as *mut libc::sockaddr_in).cast(), &mut len) };
|
||||
a
|
||||
};
|
||||
let server = bind([127, 0, 0, 3]);
|
||||
let client = bind([127, 0, 0, 1]);
|
||||
let mut dns = Dns::default();
|
||||
dns.servers.push(Server { id: super::server_id(), bridges: vec!["kiri1".into()], sock: server, container: None });
|
||||
let q = query("example.com", 1);
|
||||
dns.forward(0, &q, addr(client.as_raw_fd()), &[[127, 0, 0, 65]]);
|
||||
let p = dns.pending.last_mut().expect("forwarded");
|
||||
p.sent = Instant::now() - Duration::from_secs(10);
|
||||
p.may_relay = false; // no host relay left to wait for
|
||||
dns.on_timer();
|
||||
assert!(dns.pending.is_empty(), "the query is done");
|
||||
let mut buf = [0u8; 512];
|
||||
let n = {
|
||||
let mut got = None;
|
||||
for _ in 0..100 {
|
||||
let n = unsafe { libc::recv(client.as_raw_fd(), buf.as_mut_ptr().cast(), buf.len(), 0) };
|
||||
if n > 12 {
|
||||
got = Some(n);
|
||||
break;
|
||||
}
|
||||
std::thread::sleep(Duration::from_millis(10));
|
||||
}
|
||||
got.expect("the client got a reply")
|
||||
};
|
||||
assert_eq!(&buf[2..4], &[0x81, 0x82], "recursion available, SERVFAIL");
|
||||
assert_eq!(&buf[12..n as usize], &q[12..], "the question is echoed back");
|
||||
}
|
||||
|
||||
/// `on_readable` runs before `on_timer`: a retry arriving at or after
|
||||
/// `FORWARD_TIMEOUT` must answer the expired query SERVFAIL rather than
|
||||
/// sweeping it silently.
|
||||
#[test]
|
||||
fn an_expired_query_is_answered_servfail_when_the_next_arrives() {
|
||||
let ip = [127, 0, 0, 66];
|
||||
let _held = std::net::UdpSocket::from(super::bound(ip, 53).unwrap());
|
||||
let (client, from) = client();
|
||||
let mut dns = Dns::default();
|
||||
dns.servers.push(Server { id: super::server_id(), bridges: vec!["kiri1".into()], sock: udp_socket().unwrap(), container: None });
|
||||
let mut first = query("example.com", 1);
|
||||
first[0..2].copy_from_slice(&0x1111u16.to_be_bytes());
|
||||
dns.forward(0, &first, from, &[ip]);
|
||||
dns.pending[0].sent = Instant::now() - super::FORWARD_TIMEOUT;
|
||||
let mut retry = query("example.com", 1);
|
||||
retry[0..2].copy_from_slice(&0x2222u16.to_be_bytes());
|
||||
dns.forward(0, &retry, from, &[ip]);
|
||||
assert_eq!(dns.pending.len(), 1, "only the retry stays in flight");
|
||||
assert_eq!(dns.pending[0].id, 0x2222);
|
||||
assert_eq!(told(&client, 1000), Some((0x1111, 2)), "the expired query got SERVFAIL");
|
||||
}
|
||||
|
||||
/// On a Linux host (`relay == false`, `own.is_none()`), a query with no
|
||||
/// upstream or an upstream that cannot be sent to is answered SERVFAIL
|
||||
/// at once rather than dropped silently.
|
||||
#[test]
|
||||
fn a_query_with_no_reachable_upstream_is_answered_servfail_at_once() {
|
||||
let (client, from) = client();
|
||||
let mut dns = Dns::default();
|
||||
dns.servers.push(Server { id: super::server_id(), bridges: vec!["kiri1".into()], sock: udp_socket().unwrap(), container: None });
|
||||
for (id, upstream) in [(0x3333u16, &[][..]), (0x4444, &[[255, 255, 255, 255]][..])] {
|
||||
let mut q = query("example.com", 1);
|
||||
q[0..2].copy_from_slice(&id.to_be_bytes());
|
||||
dns.forward(0, &q, from, upstream);
|
||||
assert!(dns.pending.is_empty());
|
||||
assert_eq!(told(&client, 1000), Some((id, 2)), "id {id:#x} got SERVFAIL at once");
|
||||
}
|
||||
}
|
||||
|
||||
/// When the UDP upstream refuses the packet (`ECONNREFUSED`) and no host
|
||||
/// relay can take it (either `relay == false` on a Linux host or the
|
||||
/// host relay is unavailable), the query is answered SERVFAIL at once
|
||||
/// rather than waiting `FORWARD_TIMEOUT` on a dead socket.
|
||||
#[test]
|
||||
fn a_refused_upstream_with_no_host_relay_answers_servfail_at_once() {
|
||||
use std::os::fd::AsRawFd;
|
||||
let (client, from) = client();
|
||||
let refused_ip = [127, 0, 0, 67];
|
||||
for (id, relay) in [(0x5555u16, false), (0x6666, true)] {
|
||||
let mut dns = Dns { relay, ..Default::default() };
|
||||
dns.servers.push(Server { id: super::server_id(), bridges: vec!["kiri1".into()], sock: udp_socket().unwrap(), container: None });
|
||||
let mut q = query("example.com", 1);
|
||||
q[0..2].copy_from_slice(&id.to_be_bytes());
|
||||
dns.forward(0, &q, from, &[refused_ip]);
|
||||
assert_eq!(dns.pending.len(), 1);
|
||||
let fd = dns.pending[0].sock.as_raw_fd();
|
||||
wait_readable(fd);
|
||||
dns.on_readable(fd, &[refused_ip]);
|
||||
assert!(dns.pending.is_empty(), "relay={relay}: no dead entry left waiting");
|
||||
assert_eq!(told(&client, 1000), Some((id, 2)), "relay={relay}: SERVFAIL at once");
|
||||
assert_eq!(dns.relay_down_until.is_some(), relay);
|
||||
}
|
||||
}
|
||||
|
||||
/// #294: a container on its project's network and on a shared one, both
|
||||
/// with a `db`, joining the shared one first. Docker searches the
|
||||
/// networks by name, whatever the join order.
|
||||
@@ -1722,7 +1899,10 @@ mod tests {
|
||||
let mut dns = Dns::default();
|
||||
assert_eq!(dns.timeout_ms(), -1, "nothing pending");
|
||||
dns.pending.push(pending());
|
||||
assert_eq!(dns.timeout_ms(), -1, "nothing to hand over");
|
||||
// With no host to try, the query still needs a wake-up at its
|
||||
// timeout so it gets a SERVFAIL instead of being left unanswered.
|
||||
let t = dns.timeout_ms();
|
||||
assert!((4000..=5000).contains(&t), "only the forward wait: {t}");
|
||||
let mut p = pending();
|
||||
p.may_relay = true;
|
||||
dns.pending.push(p);
|
||||
@@ -1733,6 +1913,13 @@ mod tests {
|
||||
assert_eq!(dns.timeout_ms(), 0);
|
||||
dns.on_timer();
|
||||
assert!(!dns.pending[1].may_relay);
|
||||
let t = dns.timeout_ms();
|
||||
assert!((3000..=5000).contains(&t), "the relayed query still has its wait: {t}");
|
||||
for p in &mut dns.pending {
|
||||
p.sent = Instant::now() - super::FORWARD_TIMEOUT;
|
||||
}
|
||||
dns.on_timer();
|
||||
assert!(dns.pending.is_empty(), "both queries answered at their timeout");
|
||||
assert_eq!(dns.timeout_ms(), -1);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,12 @@ A log of every merged bug fix in Kiri, newest first, together with any later bug
|
||||
|
||||
## Fixes
|
||||
|
||||
### #715 DNS: Go clients' SRV lookups are answered here, and forwarded lookups are never silently dropped (unreleased)
|
||||
- Fixes: #715 Go gRPC clients (RoadRunner's Temporal plugin) fail with "context deadline exceeded" resolving container names via 127.0.0.11 while getent/nslookup/dig work
|
||||
- Caused: none known
|
||||
- Caused by: -
|
||||
- Check: `dns-user-net-srv-nodata`
|
||||
|
||||
### #484 Daemon: log memory-kill figures, relieve the balloon first, and attribute op stops (unreleased)
|
||||
- Fixes: #474 Daemon: log memory-kill figures and attribute Kiri-initiated stops to their operation
|
||||
- Caused: none known
|
||||
|
||||
@@ -808,6 +808,10 @@ t dns-user-net-ipv6-only-names "10.231.0.10" $D run --rm --network ipamnet --dns
|
||||
# ones within the 4 s each is given (12 s in all, as with Docker).
|
||||
$D rm -f kiri-e2e-dig-seed >/dev/null 2>&1
|
||||
$D run --name kiri-e2e-dig-seed alpine apk add --no-cache bind-tools >/dev/null 2>&1 && $D commit kiri-e2e-dig-seed kiri-e2e-dig >/dev/null && $D rm -f kiri-e2e-dig-seed >/dev/null
|
||||
# #715: gRPC looks up `_grpclb._tcp.<name>` before the name's A records.
|
||||
# The service is on this network, so it is answered NODATA here rather than
|
||||
# forwarded: a silent --dns server must not turn the lookup into a timeout.
|
||||
t dns-user-net-srv-nodata "NOERROR 0" $D run --rm --network ipamnet --dns 192.0.2.1 kiri-e2e-dig sh -c 'o=$(dig +tries=1 +time=2 _grpclb._tcp.fixed. SRV); s=$(echo "$o" | grep -o "status: [A-Z]*"); a=$(echo "$o" | grep -o "ANSWER: [0-9]*"); echo "${s#status: } ${a#ANSWER: }"'
|
||||
t dns-user-net-three-refused-servfail-at-once "SERVFAIL fast" $D run --rm --network ipamnet --dns 10.231.0.10 --dns 10.231.0.10 --dns 10.231.0.10 kiri-e2e-dig sh -c 's=$(date +%s); a=$(dig +tries=1 +time=20 example.com | grep -o "status: [A-Z]*"); [ $(( $(date +%s) - s )) -le 2 ] && echo "${a#status: } fast" || echo "${a#status: } slow"'
|
||||
t dns-user-net-three-silent-servfail-in-time "SERVFAIL in time" $D run --rm --network ipamnet --dns 192.0.2.1 --dns 192.0.2.2 --dns 192.0.2.3 kiri-e2e-dig sh -c 's=$(date +%s); a=$(dig +tries=1 +time=20 example.com | grep -o "status: [A-Z]*"); [ $(( $(date +%s) - s )) -le 14 ] && echo "${a#status: } in time" || echo "${a#status: } late"'
|
||||
$D rmi kiri-e2e-dig >/dev/null 2>&1
|
||||
|
||||
@@ -111,6 +111,7 @@ user-net-own-dns-upstream #624 a container running its own DNS server must still
|
||||
dns-user-net-next-after-refusal #455 on a user network a --dns server that refused ended the lookup: the next --dns server was never asked
|
||||
dns-user-net-all-refused-fails-at-once #455 when every --dns server of a container on a user network refused, the lookup waited for the client to give up instead of failing
|
||||
dns-user-net-next-after-silence #455 on a user network a --dns server that never answered ended the lookup: the next --dns server was never asked
|
||||
dns-user-net-srv-nodata #715 gRPC's `_grpclb._tcp.<name>` SRV lookup was forwarded instead of answered NODATA, so Go's resolver timed out on 127.0.0.11 and gRPC shut the channel down
|
||||
top-l #625 docker top -l was refused or gave the wrong columns
|
||||
top-l-values #625 docker top -l gave wrong values
|
||||
top-efl-cmd #625 docker top -efl gave the wrong command column
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 52.
|
Reference in new issue
Block a user