designate-mdns throws errors when listening on IPv6/dual-stack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Fix Released
|
High
|
Dr. Jens Harbott |
Bug Description
We set up designate-mdns so that it listens on an IPv6 socket, by setting "listen = [::]:5354" in the [service:mdns] section of designate.conf. (The background is that we have IPv6, but no IPv4 connectivity between regions, and we want to set up public-facing nameservers that can get zone data from designate in another region.) BIND 9 is used as the public-facing nameserver.
When a zone is created, it is added to designate-mdns, and then BIND 9 is told to create the zone as a slave and retrieve its contents from designate-mdns via zone transfer from port 5354. This happens even when BIND 9 connects over IPv4 to 127.0.0.1. Here is an extract of syslog on our designate server that shows the problem:
Nov 23 06:55:36 designate-0 named[11565]: received control channel command 'addzone designate-
Nov 23 06:55:36 designate-0 named[11565]: client 127.0.0.1#52994: received notify for zone 'designate-
Nov 23 06:55:36 designate-0 named[11565]: zone designate-
Nov 23 06:55:36 designate-0 named[11565]: zone designate-
Nov 23 06:55:36 designate-0 named[11565]: transfer of 'designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
Nov 23 06:55:36 designate-0 designate-
When we change the listen option to 0.0.0.0:5354, the problem goes away.
[EDITED TO ADD:] We use Ubuntu Cloud Archive packages under Ubuntu 16.04 LTS. For Designate, we use the "pike" version of UCA. The rest of our OpenStack installation still runs Newton.
description: | updated |
Changed in designate: | |
assignee: | nobody → Dr. Jens Harbott (j-harbott) |
status: | New → Confirmed |
importance: | Undecided → High |
The line
host, port = addr
assumes that "addr" (which is returned from socket.accept()) is a pair (2-tuple). But according to https:/ /docs.python. org/2/library/ socket. html, an IPv6 address will be represented as a four-tuple (host, port, flowspec, scope). In this case we can safely ignore flowspec and scope, but we must be able to parse this four-tuple variant of addr.