Univention Bugzilla – Bug 33256
Changing empty DNS TTL on Host record
Last modified: 2015-01-29 11:45:25 CET
When adding TTL (time to live) to an DNS Host record with empty TTL the following error occurs: umc-command udm/put -e -o '[{"object":{"zonettl": "3000","seconds"],"$dn$":"relativeDomainName=foo2,zoneName=product.tests,cn=dns,dc=product,dc=tests"},"options":null}]' -f "dns/dns" → File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 339, in _thread module.modify( properties ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 155, in wrapper_func ret = func( *args, **kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 410, in modify obj.modify() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 344, in modify return self._modify(modify_childs,ignore_license=ignore_license) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 871, in _modify self._ldap_post_modify() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/dns/host_record.py", line 218, in _ldap_post_modify if self.hasChanged(self.descriptions.keys()): File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 160, in hasChanged if self.hasChanged(i): File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 157, in hasChanged return not univention.admin.mapping.mapCmp(self.mapping, key, self.oldinfo.get(key, ''), self.info.get(key, '')) File "/usr/lib/pymodules/python2.6/univention/admin/mapping.py", line 193, in mapCmp return map[1](old) == map[1](new) File "/usr/lib/pymodules/python2.6/univention/admin/mapping.py", line 100, in mapUNIX_TimeInterval value = int( value ) ValueError: invalid literal for int() with base 10: ''
similar to Bug #8429 *** This bug has been marked as a duplicate of bug 8429 ***
This was reported 3 times (on Bug #8429). I'll split the duplication as 2 code branches have to be adapted. The patch is in attachment 5415 [details].
Created attachment 6608 [details] Patch for conversion handling this patch is similar to the patch for bug 8429
(In reply to Drees Dormann from comment #3) > Created attachment 6608 [details] > Patch for conversion handling > > this patch is similar to the patch for bug 8429 FYI: int(None) will raise TypeError not ValueError, please catch this, too. You can also use return directly without using 'result' as variable.
Created attachment 6609 [details] newer version of patch This is a newer version of the already posted patch , also kontaining a solution for bug8429
Created attachment 6620 [details] Newest version of patch
patch has been applied
OK: when removing the ldap attribute dNSTTL from an object and adding it in UMC the traceback does not occur anymore.
<http://errata.univention.de/ucs/4.0/65.html>