Univention Bugzilla – Bug 24210
univention-dnsedit - mehrmaliges Anlegen eines gleichartige host record führt zu Traceback
Last modified: 2011-12-13 15:49:20 CET
Der zweite Join eine UCS 3.0 Backup ist in 05univention-bind.ins abgebrochen Configure 05univention-bind.inst wait for named ? wait for named ? Adding A record "backup 10.200.7.145" to zone zzz.iii... Traceback (most recent call last): File "/usr/share/univention-admin-tools/univention-dnsedit", line 388, in <module> add_a_record(nargs) File "/usr/share/univention-admin-tools/univention-dnsedit", line 299, in add_a_record record.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 862, in _modify self.lo.modify(self.dn, ml, ignore_license=ignore_license) File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 385, in modify raise univention.admin.uexceptions.ldapError, _err2str(msg) univention.admin.uexceptions.ldapError: Type or value exists: modify/add: aRecord: value #1 already exists Der Fehler wurde durch "univention-dnsedit" (add_a_record) ausgelöst. Hier wird nach einem vorhandenen Host Record mit gleichem Namen gesucht. filter=univention.admin.filter.expression('name', name) records=univention.admin.handlers.dns.host_record.lookup(co, lo, filter, scope='domain', base=position.getDomain(), superordinate=zone, unique=1) if records: record=records[0] else: record=univention.admin.handlers.dns.host_record.object(co, lo, position, superordinate=zone) record['name']=name record['zonettl']='80600' t=record['a'] record['a'] war aber in meinen Tests immer eine leere Liste, wodurch er später einen falschen a Record gesetzt hat. Wenn ich an der entsprechenden Stelle "record.open()" hinzufüge, klappt es.
fixed, kein changelog notwendig. Die open Funktion wurde mit der IPv6 Unterstützung hinzugefügt, vorher war ein open nicht zwingend notwendig.
OK, funktioniert -> /usr/share/univention-admin-tools/univention-dnsedit --ignore-exists iii.zzz add a master 10.200.7.144 Adding A record "master 10.200.7.144" to zone iii.zzz... done -> /usr/share/univention-admin-tools/univention-dnsedit --ignore-exists iii.zzz add a master 10.200.7.144 Adding A record "master 10.200.7.144" to zone iii.zzz... done -> /usr/share/univention-admin-tools/univention-dnsedit --ignore-exists iii.zzz add a master 10.200.7.144 Adding A record "master 10.200.7.144" to zone iii.zzz... done -> univention-ldapsearch -LLL '(&(arecord=10.200.7.144)(objectClass=dNSZone))' dn: relativeDomainName=master,zoneName=iii.zzz,cn=dns,dc=iii,dc=zzz aRecord: 10.200.7.144 objectClass: top objectClass: dNSZone objectClass: univentionObject univentionObjectType: dns/host_record dNSTTL: 80600 relativeDomainName: master zoneName: iii.zzz
UCS 3.0-0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert werden: "Clone This Bug"