Bug 38064 - univention-dnsedit: traceback in admin/handlers/dns/srv_record.py when trying to modify a non-existing record
Summary: univention-dnsedit: traceback in admin/handlers/dns/srv_record.py when trying...
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
Version: UCS 4.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 4.x
Assignee: UMC maintainers
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 34222
  Show dependency treegraph
 
Reported: 2015-03-17 14:45 CET by Dmitry Galkin
Modified: 2019-01-03 07:16 CET (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:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments
List of DNS records (341.27 KB, image/png)
2015-03-17 14:51 CET, Dmitry Galkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Galkin univentionstaff 2015-03-17 14:45:52 CET
A test case introduced by: https://forge.univention.org/bugzilla/show_bug.cgi?id=34222

Fails in S4-School-only environment: http://jenkins.knut.univention.de:8080/job/UCSschool%204.0/job/UCSschool%204.0%20Multiserver/21/SambaVersion=s4-school-only/testReport/junit/90_ucsschool/97_samba4_dns_srv_replication/test/


A look inside shows a following traceback:
ADD(-ing) the test location to/from the record '_ldap._tcp.Default-First-Site-Name._sites'
An error occured while executing a command '/usr/share/univention-directory-manager-tools/univention-dnsedit --binddn=uid=Administrator,cn=users,dc=autotest204,dc=local --bindpwd=univention autotest204.local add srv ldap tcp.Default-First-Site-Name._sites 53 777 63256 ucs_test.hostname.local.',

STDERR:

 'Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-dnsedit", line 400, in <module>
    main()
  File "/usr/share/univention-directory-manager-tools/univention-dnsedit", line 365, in main
    add_srv_record(*args)
  File "/usr/share/univention-directory-manager-tools/univention-dnsedit", line 198, in add_srv_record
    record.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
    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'



Which happens only when trying to modify a record that does not exist:

root@slave2042:~/90_ucsschool# /usr/share/univention-directory-manager-tools/univention-dnsedit --binddn=uid=Administrator,cn=users,dc=autotest204,dc=local --bindpwd=univention autotest204.local add srv gc tcp.fooo._baaar 53 777 63256 ucs_test.hostname.local


The removal attempt, however reports normally, that "No record found".

REMOVE(-ing) the test location to/from the record '_kerberos._tcp.Default-First-Site-Name._sites'
An error occured while executing a command '/usr/share/univention-directory-manager-tools/univention-dnsedit --binddn=uid=Administrator,cn=users,dc=autotest204,dc=local --bindpwd=univention autotest204.local remove srv kerberos tcp.Default-First-Site-Name._sites 53 777 63256 ucs_test.hostname.local.', STDERR: 'No record found'
Comment 1 Dmitry Galkin univentionstaff 2015-03-17 14:51:01 CET
Created attachment 6766 [details]
List of DNS records
Comment 2 Stefan Gohmann univentionstaff 2019-01-03 07:16:29 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 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.