Bug 40937 - Synchronization of uppercase SRV records fails (sync to ucs)
Synchronization of uppercase SRV records fails (sync to ucs)
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.1
Other Linux
: P3 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-23 16:19 CET by Arvid Requate
Modified: 2021-05-14 15:41 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?: 2: Will only affect a few 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.069
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016032221000661, 2016112321000251, 2016120821000501, 2017013021000139, 2019050721000314
Bug group (optional): Troubleshooting
Max CVSS v3 score:
requate: Patch_Available+


Attachments
dnsSRVName_ipProtocolSRV.patch (734 bytes, patch)
2016-03-23 16:19 CET, Arvid Requate
Details | Diff
whitespaces were deleted (639 bytes, patch)
2017-01-30 15:53 CET, Christina Scheinig
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2016-03-23 16:19:22 CET
Created attachment 7560 [details]
dnsSRVName_ipProtocolSRV.patch

Ticket 2016032221000661 reported a traceback during synchronization of an uppercase SRV record. The problem is caused by the protocol part being uppercase ("_TCP") and getting ignored by the ipProtocolSRV subsyntax of the dnsSRVName UDM syntax. The attached patch is a dumb minimal fix that resolved the issue for the customer. In the product I would expect the syntax to additionally raise an error and rejecting setting syntactically invalid value instead of throwing it away silently.

This was the traceback:
========================================================================
    23.03.2016 10:24:30,793 LDAP        (PROCESS): sync to ucs: Resync rejected dn: DC=_VLMCS._TCP,DC=mydom.local,CN=MicrosoftDNS,CN=System,DC=mydom,DC=local
    23.03.2016 10:24:30,834 LDAP        (PROCESS): sync to ucs:   [           dns] [       add] relativeDomainName=_VLMCS._TCP,zonename=mydom.local,cn=dns,dc=mydom,dc=local
    23.03.2016 10:24:30,836 LDAP        (ERROR  ): Unknown Exception during sync_to_ucs
    23.03.2016 10:24:30,836 LDAP        (ERROR  ): Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1438, in sync_to_ucs
        result = self.property[property_type].ucs_sync_function(self, property_type, object)
      File "/usr/lib/pymodules/python2.7/univention/s4connector/s4/dns.py", line 1456, in con2ucs
        ucs_srv_record_create(s4connector, object)
      File "/usr/lib/pymodules/python2.7/univention/s4connector/s4/dns.py", line 1105, in ucs_srv_record_create
        newRecord.create()
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 352, in create
        return self._create()
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 685, in _create
        self._ldap_pre_create()
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/dns/srv_record.py", line 148, in _ldap_pre_create
        self.dn='%s=%s,%s' % (mapping.mapName('name'), mapping.mapValue('name', self['name']), self.position.getDn())
      File "/usr/lib/pymodules/python2.7/univention/admin/mapping.py", line 193, in mapValue__vlmcs._tc
        res=self._map[map_name][1](value)
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/dns/srv_record.py", line 108, in mapName
        return '_{0}._{1}'.format( *old[ : 2 ] )
    IndexError: tuple index out of range
========================================================================

Please note that the patch referred to by Bug 35780 did not help in this case. Instead it made the problem worse: With that patch the S4-Connector created a record

 relativeDomainName=VLMCS,zonename=mydom.local,cn=dns,dc=mydom,dc=local

in UCS, which then was synchronized back to AD as DC=VLMCS. Bug 35780 simply addresses a different issue.
Comment 2 Christina Scheinig univentionstaff 2017-01-30 15:53:22 CET
Created attachment 8384 [details]
whitespaces were deleted
Comment 3 Christina Scheinig univentionstaff 2017-01-30 15:55:39 CET
The old patch dnsSRVName_ipProtocolSRV.patch could not be applied since 11.0.3-46

I attached a new one (ipProtocolSRV_2.patch)
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:20:57 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 5 Arvid Requate univentionstaff 2019-05-16 17:58:49 CEST
Still an issue, patch available.
Comment 6 Ingo Steuwer univentionstaff 2021-05-14 15:41:14 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.