Bug 34238 - Suggestion of master FQDN fails when non-authoritative DNS server is set
Suggestion of master FQDN fails when non-authoritative DNS server is set
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain join
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Drees Dormann
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-04 12:02 CET by Florian Best
Modified: 2015-08-25 10:35 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-03-04 12:02:24 CET
We received the following traceback:

3.2-0 errata61 (Borgfeld)
Die Ausführung des Kommandos join/master ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py",
line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py",
line 305, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py",
line 432, in _response
    for res in function(self, iterator, *nones):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py",
line 271, in _fake_func
    yield function(self, *args)
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/join/__init__.py",
line 324, in master
    return get_master_dns_lookup()
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/join/__init__.py",
line 63, in get_master_dns_lookup
    result = dns.resolver.query(query, 'SRV')
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 732, in query
    return get_default_resolver().query(qname, rdtype, rdclass, tcp, source)
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 672, in query
    answer = Answer(qname, rdtype, rdclass, response)
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 121, in __init__
    raise NoAnswer
NoAnswer

The UMC join module suggests the FQDN for the master system by querying the DNS server.

The failure happens when the nameserver is not authoritative (The DNS request is then redirected).

http://stackoverflow.com/questions/18898847/dnspython-raises-noanswer-in-spite-of-query-answer
suggests to replace dns.resolver.query() by dns.query.udp().

It is probably easier to just catch the exception and letting the user decide about the FQDN. I guess on the system is a wrong DNS server configured which is not part of the UCS domain.
Comment 1 Dirk Wiesenthal univentionstaff 2014-04-01 10:26:23 CEST
Reported again.
Remark: after update to 3.2.1 from 3.2.0
Version: 3.2-1 errata78 (Borgfeld)
Comment 2 Dirk Wiesenthal univentionstaff 2014-04-14 13:19:15 CEST
Reported once again (maybe the same system though)
Comment 3 Dirk Wiesenthal univentionstaff 2014-07-25 09:00:35 CEST
Reported once again. 3.2-1 errata51
Comment 4 Janis Meybohm univentionstaff 2014-07-29 10:01:49 CEST
Reported again Ticket#: 2014072821000254
Comment 5 Dirk Wiesenthal univentionstaff 2014-08-04 14:50:57 CEST
If you configured the wrong Domain DNS server in system-setup, you get the following error:

Die Ausführung des Kommandos join/master ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 218, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 305, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 432, in _response
    for res in function(self, iterator, *nones):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 271, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/join/__init__.py", line 324, in master
    return get_master_dns_lookup()
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/join/__init__.py", line 63, in get_master_dns_lookup
    result = dns.resolver.query(query, 'SRV')
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 732, in query
    return get_default_resolver().query(qname, rdtype, rdclass, tcp, source)
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 662, in query
    timeout = self._compute_timeout(start)
  File "/usr/lib/pymodules/python2.6/dns/resolver.py", line 541, in _compute_timeout
    raise Timeout
Timeout
Comment 6 Florian Best univentionstaff 2014-09-22 10:20:09 CEST
Reported again 3.2-3 errata206 (Borgfeld).
Comment 7 Florian Best univentionstaff 2014-11-24 09:49:51 CET
Reported again: 3.2-3 errata178
Comment 8 Dirk Wiesenthal univentionstaff 2014-12-13 23:08:09 CET
Reported again: 4.0-0 errata10 (Walle)
Comment 9 Florian Best univentionstaff 2014-12-15 10:13:52 CET
Reported again: 4.0-0 errata10 (Walle)
Remark:
Trying to add a backup UCS domain controller. Getting connection refused
Comment 10 Drees Dormann univentionstaff 2015-01-21 14:52:44 CET
An error handling has been added which should catch most exceptions which are a result of a failed dns query. In this case a warning message is diplayed.
(r 57437)
Comment 11 Florian Best univentionstaff 2015-01-21 14:59:08 CET
Typo in translation: Bitte rufen sSie das

"Das System wurde bisher noch nicht in eine Domäne Gejoined."
→ Das System ist noch keiner Domäne beigetreten.

"}else{" → "} else {"

"The DNS server settings can be adjusted in the " → "The DNS server settings can be adjusted in the {0}."
→ add missing trailing dot and use lang.replace(..., [tools.linkToModule()])
Comment 12 Drees Dormann univentionstaff 2015-01-21 15:41:20 CET
-typos have been fixed
-trailing dot has been added
Comment 13 Florian Best univentionstaff 2015-01-28 15:35:15 CET
* The leading dot is still missing after the link to the network module.
* Please also check if the network module exists otherwise there is the string 'none'.
* The original problem is not solved: If the DNS query contains a delegated answer the FQDN is not detected. See http://stackoverflow.com/questions/18898847/dnspython-raises-noanswer-in-spite-of-query-answer. The article suggests to use dns.query.udp(). 
* Wording is not optimal, we could chat about this. I have a patch for you.
* It would also be nice to reduce the timeout. Instead of waiting 25 seconds that the module is opened we should reduce this to at maximum 3 seconds.
Comment 14 Florian Best univentionstaff 2015-01-28 15:38:18 CET
* There is also no check if data.result.error_message is None → in case the domain is not found (without NXDOMAIN).
Comment 15 Drees Dormann univentionstaff 2015-02-02 13:52:20 CET
Timeout has been set to 3 seconds, however using dns.query.udp() would be too much efford so method of dns lookup stays the same.
The error messages and checks have been adapted.
Comment 16 Florian Best univentionstaff 2015-02-03 14:37:30 CET
OK: Exceptions (NoAnswer, Timeout, DNSException, NXDOMAIN)
OK: de|en
OK: DNS timeout 3 seconds
OK: network link
OK: YAML
Comment 17 Janek Walkenhorst univentionstaff 2015-02-04 15:57:10 CET
<http://errata.univention.de/ucs/4.0/69.html>
Comment 18 Florian Best univentionstaff 2015-08-25 10:35:42 CEST
Reported again, 3.2-6 errata340 (Borgfeld)