DNSaas_Dynect_Backend: Designate MDNS fails to send SOA messages to dynect with error " dns.exception.SyntaxError"

Bug #1623949 reported by Alok Kumar Maurya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Graham Hayes

Bug Description

DNSaas_Dynect_Backend: Designate MDNS fails to send SOA messages to dynect with error " dns.exception.SyntaxError"
I have provided following nameservers in pools.yaml .
All these namservers are directly reachable from HOS controllers

s ping ns1.p13.dynect.net
PING ns1.p13.dynect.net (208.78.70.13) 56(84) bytes of data.
64 bytes from ns1.p13.dynect.net (208.78.70.13): icmp_seq=1 ttl=54 time=9.10 ms
64 bytes from ns1.p13.dynect.net (208.78.70.13): icmp_seq=2 ttl=54 time=9.07 ms
nameservers:
host: ns1.p13.dynect.net
port: 53
host: ns2.p13.dynect.net
port: 53
host: ns3.p13.dynect.net
port: 53
host: ns4.p13.dynect.net
port: 53
When user creates zones , MDNS tries to send SOA to these nameservers , but it fails with below error
2016-09-14 13:38:59.444 30452 INFO designate.mdns.notify [req-70535ff1-1747-4a0e-9bcf-bb87d329ed4a - - - - -] Sending 'SOA' for 'newd.com.' to 'ns1.p13.dynect.net:53'.
2016-09-14 13:38:59.455 30452 INFO dns.query [req-70535ff1-1747-4a0e-9bcf-bb87d329ed4a - - - - -] ALOK
2016-09-14 13:38:59.456 30452 INFO dns.query [req-70535ff1-1747-4a0e-9bcf-bb87d329ed4a - - - - -] ('208.78.70.13', 53)
2016-09-14 13:38:59.456 30452 INFO dns.query [req-70535ff1-1747-4a0e-9bcf-bb87d329ed4a - - - - -] (u'ns1.p13.dynect.net', 53)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher [req-70535ff1-1747-4a0e-9bcf-bb87d329ed4a - - - - -] Exception during message handling:
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher incoming.message))
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/designate/rpc.py", line 182, in _dispatch
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher return super(RPCDispatcher, self)._dispatch(*args, **kwds)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 185, in _dispatch
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/designate/mdns/notify.py", line 89, in poll_for_serial_number
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher retry_interval, max_retries, delay)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/designate/mdns/notify.py", line 122, in get_serial_number
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher zone, host, port, timeout, retry_interval, retries_left)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/designate/mdns/notify.py", line 200, in _make_and_send_dns_message
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher timeout)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/designate/mdns/notify.py", line 304, in _send_dns_message
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher dns_message, host, port=port, timeout=timeout)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/dns/query.py", line 222, in udp
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher if _addresses_equal(af, from_address, destination) or \
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/dns/query.py", line 153, in _addresses_equal
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher n2 = dns.inet.inet_pton(af, a2[0])
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/dns/inet.py", line 50, in inet_pton
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher return dns.ipv4.inet_aton(text)
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher File "/opt/stack/venv/designate-20160905T180556Z/lib/python2.7/site-packages/dns/ipv4.py", line 46, in inet_aton
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher raise dns.exception.SyntaxError
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher SyntaxError
2016-09-14 13:38:59.457 30452 ERROR oslo_messaging.rpc.dispatcher
After further debugging the issue and adding some debug logs I found that , MDNS tries to parse DNSserver hostname as an IP .
Looks like it tries to do compare Hostname with IP , i.e it tries to compare 208.78.70.13 with ns1.p13.dynect.net

Revision history for this message
Kiall Mac Innes (kiall) wrote :

So, there's a quick "fix" we can do while we figure out the right thing to do.

Quick fix: validate the values are IPs, fail to import the YAML if there not.

Longer fix: Resolve the IPs before passing to dnspython. This is harder than it sounds, because we must reapect TTLs and shouldn't do the lookup for every single notify we send.

Tim Simmons (timsim)
Changed in designate:
status: New → Triaged
importance: Undecided → High
tags: added: rc-doc-potential
Changed in designate:
milestone: none → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/427521

Changed in designate:
assignee: nobody → Graham Hayes (grahamhayes)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/427521
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=a7dda9c341506e295b6781860adf9b5dc5fc2102
Submitter: Jenkins
Branch: master

commit a7dda9c341506e295b6781860adf9b5dc5fc2102
Author: Graham Hayes <email address hidden>
Date: Wed Feb 1 00:19:43 2017 +0000

    Do not send DNS queries against hostnames

    the `dns.query` API takes an IP address.

    This ensures the `host` is always an IP

    Change-Id: Id9601173e68bab3b6b245215f82b02a6492670cd
    Closes-Bug: #1623949

Changed in designate:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 4.0.0.0rc1

This issue was fixed in the openstack/designate 4.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.