Univention Bugzilla – Bug 43304
KeyError: 'ip' in dns/ptr_record
Last modified: 2017-04-04 18:28:27 CEST
svn r74605 added the new pseudo-property 'ip' to dns/ptr_record (See also Bug #25354). On a UCS 4.2 system the join log contains: Configure /usr/lib/univention-install/05univention-bind.inst 2017-01-05 10:43:35.246996897-05:00 (in joinscript_init) Adding ZONE record "root@deadlock21.intranet. 1 28800 7200 604800 10800 master211.deadlock21.intranet." to zone deadlock21.intranet... done Adding A record "master211 10.201.21.1" to zone deadlock21.intranet... done Adding ZONE record "root@deadlock21.intranet. 1 28800 7200 604800 10800 master211.deadlock21.intranet." to zone 10.201... done Adding PTR record "1.21 master211.deadlock21.intranet." to zone 10.201... Traceback (most recent call last): File "/usr/share/univention-admin-tools/univention-dnsedit", line 403, in <module> main() File "/usr/share/univention-admin-tools/univention-dnsedit", line 372, in main add_ptr_record(*args) File "/usr/share/univention-admin-tools/univention-dnsedit", line 321, in add_ptr_record record.create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 306, in create return self._create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 705, in _create self._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 500, in _ldap_pre_create self.dn = self._ldap_dn() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 506, in _ldap_dn identifier.append((self.mapping.mapName(name), self.mapping.mapValue(name, self.info[name]), 2)) KeyError: 'ip'
# python -m pdb /usr/share/univention-admin-tools/univention-dnsedit "$@" --ignore-exists --reverse "$reversezone" add ptr "1.24" "$hostname.$domainname." > /usr/share/univention-admin-tools/univention-dnsedit(6)<module>() -> """Create and modify dns objects easily.""" (Pdb) c Adding PTR record "1.24 master211.deadlock21.intranet." to zone 10.201... Traceback (most recent call last): File "/usr/lib/python2.7/pdb.py", line 1314, in main pdb._runscript(mainpyfile) File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript self.run(statement) File "/usr/lib/python2.7/bdb.py", line 400, in run exec cmd in globals, locals File "<string>", line 1, in <module> File "/usr/share/univention-admin-tools/univention-dnsedit", line 6, in <module> """Create and modify dns objects easily.""" File "/usr/share/univention-admin-tools/univention-dnsedit", line 372, in main add_ptr_record(*args) File "/usr/share/univention-admin-tools/univention-dnsedit", line 321, in add_ptr_record record.create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 306, in create return self._create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 705, in _create self._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 500, in _ldap_pre_create self.dn = self._ldap_dn() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 506, in _ldap_dn identifier.append((self.mapping.mapName(name), self.mapping.mapValue(name, self.info[name]), 2)) KeyError: 'ip' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py(506)_ldap_dn() -> identifier.append((self.mapping.mapName(name), self.mapping.mapValue(name, self.info[name]), 2)) (Pdb) self.info {'ptr_record': ['master211.deadlock21.intranet.'], 'address': '1.24'}
univention-directory-manager-modules (12.0.11-2): r75605 | Bug #43304 umd: Fix creating PTR records Why did you overwrote _ldap_dn instead of setting identifies=True at the correct property? At least the name column displayed in UMC is in the wrong order. For relativeDomainName=1.25,zoneName=201.10.in-addr.arpa,… it shows in UMC "10.201.25.1" instead of "10.201.1.25".
(In reply to Florian Best from comment #2) > At least the name column displayed in UMC is in the wrong order. > For relativeDomainName=1.25,zoneName=201.10.in-addr.arpa,… it shows in UMC > "10.201.25.1" instead of "10.201.1.25". Hm, no this seems correct as the value of relativeDomainName is the reverse notation.
(In reply to Florian Best from comment #0) > svn r74605 added the new pseudo-property 'ip' to dns/ptr_record (See also > Bug #25354). On a UCS 4.2 system the join log contains: Why isn't it a problem on UCS 4.1-4 systems?
(In reply to Stefan Gohmann from comment #4) > (In reply to Florian Best from comment #0) > > svn r74605 added the new pseudo-property 'ip' to dns/ptr_record (See also > > Bug #25354). On a UCS 4.2 system the join log contains: > > Why isn't it a problem on UCS 4.1-4 systems? Bug #25354#c16. The two commits weren't commited for UCS 4.1-4 as they change the behavior in UMC.
r75605 | Bug #43304 umd: Fix creating PTR records Package: univention-directory-manager-modules Version: 12.0.11-2A~4.2.0.201701051734 Branch: ucs_4.2-0 (In reply to Florian Best from comment #2) > univention-directory-manager-modules (12.0.11-2): > r75605 | Bug #43304 umd: Fix creating PTR records > > Why did you overwrote _ldap_dn instead of setting identifies=True at the > correct property? modules/univention/admin/objects.py:115 > At least the name column displayed in UMC is in the wrong order. > For relativeDomainName=1.25,zoneName=201.10.in-addr.arpa,… it shows in UMC > "10.201.25.1" instead of "10.201.1.25". Seems you're confused, as 10.201.25.1 is correct: # udm dns/ptr_record list --superordinate zoneName=201.10.in-addr.arpa,cn=dns,dc=phahn,dc=qa DN: relativeDomainName=1.25,zoneName=201.10.in-addr.arpa,cn=dns,dc=phahn,dc=qa ARG: None ptr_record: master41.phahn.qa. ip: 10.201.25.1 address: 1.25 # dig +noqr +noquestion +nocmd +nocomments +nostats +noadditional +noauthority +nottl +nocl @127.0.0.1 -x 10.201.25.1 ptr 1.25.201.10.in-addr.arpa. PTR master41.phahn.qa.
r75611 | Bug #43304 umd: Fix creating PTR records change to using .identifies Package: univention-directory-manager-modules Version: 12.0.11-3A~4.2.0.201701061113 Branch: ucs_4.2-0
[2017-01-12 06:47:09.203483] Creating dns/ptr_record object with /usr/sbin/udm-test dns/ptr_record create --superordinate zoneName=30.20.10.in-addr.arpa,dc=AutoTest091,dc=local --set address=2 [2017-01-12 06:47:09.397403] Cleanup after exception: <class 'univention.testing.udm.UCSTestUDM_CreateUDMObjectFailed'> returncode=3 [2017-01-12 06:47:09.407707] stdout=E: Insufficient information: The following properties are missing: [2017-01-12 06:47:09.407729] ptr_record [2017-01-12 06:47:09.407742] stderr= [2017-01-12 06:47:09.407751] module=dns/ptr_record [2017-01-12 06:47:09.407761] kwargs={'superordinate': 'zoneName=30.20.10.in-addr.arpa,dc=AutoTest091,dc=local', 'address': '2'} [2017-01-12 06:47:09.407775] Performing UCSTestUDM cleanup... [2017-01-12 06:47:09.595524] UCSTestUDM cleanup done (2017-01-12 06:47:09.595567) Traceback (most recent call last): (2017-01-12 06:47:09.595581) File "57_dns_ptr_creation", line 19, in <module> (2017-01-12 06:47:09.595592) ptr = udm.create_object('dns/ptr_record', address='2', superordinate=reverse_zone) (2017-01-12 06:47:09.595604) File "/usr/lib/pymodules/python2.7/univention/testing/udm.py", line 202, in create_object (2017-01-12 06:47:09.595616) raise UCSTestUDM_CreateUDMObjectFailed({'module': modulename, 'kwargs': kwargs, 'returncode': child.returncode, 'stdout': stdout, 'stderr': stderr}) (2017-01-12 06:47:09.595632) univention.testing.udm.UCSTestUDM_CreateUDMObjectFailed: returncode=3 (2017-01-12 06:47:09.595640) stdout=E: Insufficient information: The following properties are missing: (2017-01-12 06:47:09.595648) ptr_record (2017-01-12 06:47:09.595656) stderr= (2017-01-12 06:47:09.595664) module=dns/ptr_record (2017-01-12 06:47:09.595673) kwargs={'superordinate': 'zoneName=30.20.10.in-addr.arpa,dc=AutoTest091,dc=local', 'address': '2'} http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/57_dns_ptr_creation/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/58_dns_ptr_removal/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/60_dns_ptr_modification_set_record/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/61_dns_ptr_modification_append_records/test/
modules/univention/admin/handlers/dns/__init__.py doesn't contain a copyright header and is indented with spaces instead of tabs.
Creating a PTR record without a target is no longer valid (In reply to Florian Best from comment #8) > http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/ > AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/ > 57_dns_ptr_creation/test/ Removed as it is the same as 59, which creates a PTR with a target > http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/ > AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/ > 58_dns_ptr_removal/test/ > http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/ > AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/ > 60_dns_ptr_modification_set_record/test/ > http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/ > AutotestJoin/SambaVersion=s4,Systemrolle=master/8/testReport/67_udm-dns/ > 61_dns_ptr_modification_append_records/test/ Added required target. r75796 | Bug #43304 test: Adapt dns/ptr tests (In reply to Florian Best from comment #9) > modules/univention/admin/handlers/dns/__init__.py doesn't contain a > copyright header and is indented with spaces instead of tabs. r75798 | Bug #43304 udm: Convert space to tabs
ucs-test (7.0.8-1): r75895 | Bug #43304: fix verify statement
univention-directory-manager-modules (12.0.11-6): r75896 | Bug #43304: add copyright header OK: ucs-test OK: identifies property No changelog required, interim version
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".