Bug 40839 - dns/txt_record detecs e.g. host records as TXT record in lookup()
dns/txt_record detecs e.g. host records as TXT record in lookup()
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Florian Best
Johannes Keiser
:
: 32235 41001 44078 44320 (view as bug list)
Depends on:
Blocks: 30368 44976 45011
  Show dependency treegraph
 
Reported: 2016-03-04 10:17 CET by Florian Best
Modified: 2023-10-09 08:37 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.103
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017041321000451
Bug group (optional): External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.89 KB, patch)
2016-03-04 12:24 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-03-04 10:17:45 CET
>>> univention.admin.handlers.dns.txt_record.lookup(None, lo, '', superordinate=superordinate)[0].oldattr
{'aRecord': ['1.2.3.4'], 'objectClass': ['top', 'dNSZone', 'univentionObject'], 'univentionObjectType': ['dns/host_record'], 'dNSTTL': ['10800'], 'tXTRecord': ['oixaajny'], 'relativeDomainName': ['pawnldyp'], 'zoneName': ['nuvbvnoc']}

This causes some bugs:
* It is displayed twice in UMC
* There are exceptions like KeyError when accessing specific properties.
* …?!
Comment 1 Florian Best univentionstaff 2016-03-04 10:28:12 CET
The situation gets better when adding the following filter in lookup():
(|(univentionObjectType=)(univentionObjectType=dns/txt_record))
And identify() should also be adjusted accordingly.

But the general problem is also that we don't set univentionObjectType correctly so that we can't really identify what this actually really is. e.g. Bug #38073.

As we can't use univentionObjectType for identification due to backwards compatibility can we somehow else identify this reliable? Excluding objects with specific attributes (aRecord) seems for me to be a workaround.
Comment 2 Florian Best univentionstaff 2016-03-04 10:37:35 CET
LDIF:

dn: relativeDomainName=pawnldyp,zoneName=nuvbvnoc,cn=dns,dc=school,dc=local
aRecord: 1.2.3.4
objectClass: top
objectClass: dNSZone
objectClass: univentionObject
univentionObjectType: dns/host_record
dNSTTL: 10800
relativeDomainName: pawnldyp
zoneName: nuvbvnoc
tXTRecord: oixaajny
Comment 3 Florian Best univentionstaff 2016-03-04 12:24:41 CET
Created attachment 7519 [details]
patch
Comment 4 Florian Best univentionstaff 2016-04-06 06:39:19 CEST
*** Bug 41001 has been marked as a duplicate of this bug. ***
Comment 5 Florian Best univentionstaff 2016-04-06 06:40:52 CEST
This causes also that the entry is detected twice as host record when searching regular underneath of a forward zone (Bug #41001).
Comment 6 Florian Best univentionstaff 2017-06-23 14:32:43 CEST
Create such an object:
eval "$(ucr shell)"
udm dns/forward_zone create --position "cn=dns,$ldap_base" --set zoneName=nuvbvnoc --set zone=nuvbvnoc --set nameserver=localhost

udm dns/host_record create --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --set name=pawnldyp --set a=1.2.3.4

udm 'dns/host_record' modify --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --dn "relativeDomainName=pawnldyp,zoneName=nuvbvnoc,cn=dns,$ldap_base" --set "txt=oixaajny"

univention-directory-manager 'dns/host_record' list --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --filter relativeDomainName=pawnldyp | egrep '^ *txt: ' | sed 's/^ *txt: //'
Comment 7 Florian Best univentionstaff 2017-06-28 14:52:54 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 8 Florian Best univentionstaff 2017-07-07 14:22:51 CEST
Fixed with a different patch which doesn't rely fully on univentionObjectType.

univention-directory-manager-modules (12.0.17-70):
r80966 | Bug #40839: fix detection of txt/host records

univention-directory-manager-modules.yaml:
r80968 | YAML Bug #40839
Comment 9 Johannes Keiser univentionstaff 2017-07-07 18:48:48 CEST
OK Host records not detected in txt_record lookup
   Displayed only once

YAML: OK
-> verified
Comment 10 Florian Best univentionstaff 2017-07-11 17:04:26 CEST
*** Bug 32235 has been marked as a duplicate of this bug. ***
Comment 11 Erik Damrose univentionstaff 2017-07-26 14:39:22 CEST
<http://errata.software-univention.de/ucs/4.2/115.html>
Comment 12 Philipp Hahn univentionstaff 2021-04-27 11:07:19 CEST
*** Bug 44078 has been marked as a duplicate of this bug. ***
Comment 13 Philipp Hahn univentionstaff 2023-10-09 08:37:05 CEST
*** Bug 44320 has been marked as a duplicate of this bug. ***