Bug 53425 - univention.admin.uexceptions.wrongObjectType: … is not recognized as dns/txt_record.
univention.admin.uexceptions.wrongObjectType: … is not recognized as dns/txt_...
Status: NEW
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-08 22:29 CEST by Florian Best
Modified: 2023-06-20 11:58 CEST (History)
1 user (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: 2021083121000054, 2022033021000134, 2022061021000087, 2022061021000069 2023061321000151
Bug group (optional): Error handling, External feedback
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 2021-06-08 22:29:22 CEST
Since UCS 5.0 the S4-Connector raises this exception during the Jenkins tests.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/s4connector/__init__.py", line 1441, in sync_to_ucs
    result = self.property[property_type].ucs_sync_function(self, property_type, object)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/dns.py", line 1655, in con2ucs
    ucs_txt_record_create(s4connector, object)
  File "/usr/lib/python3/dist-packages/univention/s4connector/s4/dns.py", line 1223, in ucs_txt_record_create
    foundRecord = univention.admin.handlers.dns.txt_record.object(None, s4connector.lo, position=None, dn=searchResult[0][0], update_zone=False)                                                                                              
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/dns/txt_record.py", line 112, in __init__
    univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes)
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 225, in __init__
    raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module))
univention.admin.uexceptions.wrongObjectType: relativeDomainName=dh7oqp6j5s,zoneName=ygl4rcnhlb.d26modikpa,dc=AutoTest091,dc=local is not recognized as dns/txt_record.

The reason is probably when a DNS record exists in S4 and UCS (having a aRecord and txtRecord assigned → therefor a dns/host_record on UCS side) and one removes the aRecord on S4, the object in UCS is still a dns/host_record. _identify_dns_con_object() detects it as dns/txt_record. This since UCS 5.0 raises the exception.
Comment 1 Florian Best univentionstaff 2021-10-25 14:43:46 CEST
7d77fa6d51f1 | Bug #53425: [grep_traceback]: ignore traceback
Comment 2 Maximilian Janßen univentionstaff 2021-11-24 14:34:01 CET
Version: 5.0-0 errata75

Remark: Creating TXT records using global host '@' appears to have created nested dn object.

Error: 
Internal server error during "udm/query (dns/dns)".
Request: udm/query (dns/dns)

  File "%PY3%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY3%/notifier/__init__.py", line 105, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY3%/univention/management/console/modules/udm/__init__.py", line 595, in _thread
    superordinate = mod.get(superordinate)
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 730, in get
    UDM_Error(exc).reraise()
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 365, in reraise
    six.reraise(self.__class__, self, self.exc_info[2])
  File "%PY3%/six.py", line 692, in reraise
    raise value.with_traceback(tb)
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 718, in get
    obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes)
  File "%PY3%/univention/admin/handlers/dns/txt_record.py", line 112, in __init__
    univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes)
  File "%PY3%/univention/admin/handlers/__init__.py", line 225, in __init__
    raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module))
univention.management.console.modules.udm.udm_ldap.UDM_Error: The object type of this object differs from the specified object type.
relativeDomainName=@,zoneName=****,cn=dns,dc=gracetx,dc=org is not recognized as dns/txt_record.

Role: domaincontroller_master
Comment 3 Florian Best univentionstaff 2022-03-30 04:22:15 CEST
Reported again, Version: 5.0-1 errata262

Remark: Went to create a new host record as @ (root), saved it, got this message about an internal error. Unable to delete @ record as it appears as a duplicate zone and keeps
popping internal error.

Error:
Internal server error during "udm/query (dns/dns)".
Request: udm/query (dns/dns)

Traceback (most recent call last):
  File "%PY3%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY3%/notifier/__init__.py", line 105, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY3%/univention/management/console/modules/udm/__init__.py", line 595, in _thread
    superordinate = mod.get(superordinate)
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 730, in get
    UDM_Error(exc).reraise()
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 365, in reraise
    six.reraise(self.__class__, self, self.exc_info[2])
  File "%PY3%/six.py", line 692, in reraise
    raise value.with_traceback(tb)
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 718, in get
    obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes)
  File "%PY3%/univention/admin/handlers/dns/host_record.py", line 156, in __init__
    univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes)
  File "%PY3%/univention/admin/handlers/__init__.py", line 223, in __init__
    raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module))
univention.management.console.modules.udm.udm_ldap.UDM_Error: The object type of this object differs from the specified object type.
relativeDomainName=@,zoneName=newtonnet.net,cn=dns,dc=newtonnet,dc=net is not recognized as dns/host_record.

Role: domaincontroller_master
Comment 4 Arvid Requate univentionstaff 2022-03-30 13:58:43 CEST
I guess Comment 3 could be Bug 50385.
Comment 5 Maximilian Janßen univentionstaff 2023-06-20 11:58:43 CEST
Request: udm/remove (dns/dns)
Version: 5.0-3 errata709