From f2c06477afbfb0e44d08f4228a1a87a9208c5c5f Mon Sep 17 00:00:00 2001 From: Graham Hayes Date: Fri, 4 Mar 2016 15:00:57 +0000 Subject: [PATCH] Fix for TCP connections not sending full content Eventlet previously broke the standard API for sockets and made socket.send() work in the same manor as socket.sendall() https://github.com/eventlet/eventlet/commit/c315ee86dac996ac533b738f7c8777f4d01a0472 reverted to the standard behaviour. This was released as part of 0.18.0. The bug manifests itself when large (multi TCP message) AXFRs are performed over long distances. (I replicated it when the messages grew to 3, over USWest -> EU transfer) see http://graham.hayes.ie/posts/minidns-tcp-and-the-internet/ for details on testing. This change can cause packets to be dropped intermitently - but retry will allow this to be overcome. Change-Id: Ia0c15d843fb2092cc693b37dc701492396c647d0 Closes-Bug: #1552864 --- designate/service.py | 2 +- releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml diff --git a/designate/service.py b/designate/service.py index c92012dbf..98c7f789d 100644 --- a/designate/service.py +++ b/designate/service.py @@ -339,7 +339,7 @@ class DNSService(object): # Handle TCP Responses msg_length = len(response) tcp_response = struct.pack("!H", msg_length) + response - client.send(tcp_response) + client.sendall(tcp_response) else: # Handle UDP Responses self._dns_sock_udp.sendto(response, addr) diff --git a/releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml b/releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml new file mode 100644 index 000000000..3cee585c7 --- /dev/null +++ b/releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml @@ -0,0 +1,10 @@ +--- +issues: + - The fix for minidns's issues TCP can cause minidns to fail to send some messages. + This manifests itself with eventlet not being able to send all the data + before socket is closed. +critical: + - Previous versions of eventlet changed the behaviour of socket.send() to + match socket.sendall(). in eventlet 0.18.0 this changed and it reverted + to the traditional behaviour. MiniDNS has been updated to allow minidns to + push large zone transfers over long range network connections