Univention Bugzilla – Bug 40885
KeyError: 'subnet' when switching from forward-zone to reverse-zone
Last modified: 2024-01-12 10:17:59 CET
Version: 4.1-1 errata123 (Vahr) Execution of command 'udm/query dns/dns' has failed: Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 532, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 84, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 135, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 471, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dns/dns.py", line 112, in lookup ret+= univention.admin.handlers.dns.ptr_record.lookup(co, lo, filter_s, base, superordinate, scope, unique, required, timeout, sizelimit) File "%PY2.7%/univention/admin/handlers/dns/ptr_record.py", line 137, in lookup filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValue('subnet', superordinate['subnet']))) File "%PY2.7%/univention/admin/handlers/__init__.py", line 302, in __getitem__ elif not key in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'
This happens if the specified superordinate in the request is not a dns/reverse_zone. My guess is that this happens when changing the zone from a reverse-zone to a forward-zone, then a automatic search is triggered but the search form widgets are still not updated so that they search for pointer records underneath of a forward zone. Here is a example request using curl which reproduces the error: curl 'http://Administrator:univention@xen3.school.local/univention-management-console/command/udm/query' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary '{"options":{"superordinate":"cn=dns,dc=school,dc=local","objectType":"dns/ptr_record","objectProperty":"None","objectPropertyValue":"","hidden":false,"fields":["name","ptr_record","path"]},"flavor":"dns/dns"}'
Very similar is this one (found by myself) - but not reliable reproducible / during interim version: Die Ausführung des Kommandos udm/query dns/dns ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 535, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 86, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 135, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 471, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dns/dns.py", line 94, in lookup ret+=univention.admin.handlers.dns.host_record.lookup(co, lo, filter_s, base, superordinate, scope, unique, required, timeout, sizelimit) File "%PY2.7%/univention/admin/handlers/dns/host_record.py", line 250, in lookup for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit): File "%PY2.7%/univention/admin/uldap.py", line 359, in search raise univention.admin.uexceptions.ldapError('%s: %s' % (_err2str(msg), filter)) ldapError: Bad search filter: (&(objectClass=dNSZone)(!(relativeDomainName=@))(!(zoneName=*.in-addr.arpa))(!(zoneName=*.ip6.arpa))(!(cNAMERecord=*))(!(sRVRecord=*))(|(aRecord=*)(aAAARecord=*)(mXRecord=*))(zoneName=sc hool.local)(ptr_record=*)) Remark: Von Reverse Zone 10. mit Suche nach PTR-Record-Attribut gewechselt auf Forward-Zone school.local, die autosearch hat den Traceback ausgelöst. curl 'https://Administrator:univention@xen3.school.local/univention-management-co[..]' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary '{"options":{"superordinate":"zoneName=school.local,cn=dns,dc=school,dc=local","objectType":"dns/dns","objectProperty":"ptr_record","objectPropertyValue":"*","hidden":false,"fields":["name", "ptr_record","$value$","labelObjectType"]},"flavor":"dns/dns"}' Version: 4.1-1 errata122 (Vahr)
Reported again, 4.0-3 errata363 (Walle)
Reported again, 4.1-2 errata210 (Vahr)
Reported again, 4.1-3 errata282 (Vahr) Remark: unknown
I think the frontend behavior has been fixed by http://errata.software-univention.de/ucs/4.1/321.html (a request with a container as superordinate is prevented, the form also doesn't have an superordinate widget anymore but uses the selected item from the tree directly). I can't prove because it's not reproducible. The traceback may still occur when doing a request mentioned in comment #1. Therefore leaving open.
Version: 4.2-0 errata15 (Lesum) Remark: ooo Execution of command 'udm/query dns/dns' has failed: Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 545, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 86, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 476, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dns/ptr_record.py", line 227, in lookup filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValue('subnet', superordinate['subnet']))) File "%PY2.7%/univention/admin/handlers/__init__.py", line 277, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'
Version: 4.2-2 errata189 (Lesum) Remark: Expanding DNS tree.
Version: 4.1-0 errata55 (Vahr) Remark: Host Record für ***.ch erzeugt mit Host-Record @
Reported again: Version: 4.2-3 errata262 (Lesum)
Reported again: Version: 4.2-3 errata52 (Lesum) Remark: record created with @sign
Reported again: Version: 4.3-0 errata0 (Neustadt)
Reported again: Version: 4.2-3 errata418 (Lesum) Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 561, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 82, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 484, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dns/dns.py", line 105, in lookup ret += univention.admin.handlers.dns.ptr_record.lookup(co, lo, ptr_filter, base, superordinate, scope, unique, required, timeout, sizelimit) File "%PY2.7%/univention/admin/handlers/dns/ptr_record.py", line 227, in lookup filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValue('subnet', superordinate['subnet']))) File "%PY2.7%/univention/admin/handlers/__init__.py", line 329, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet' Role: domaincontroller_master
Reported again: Version: 4.3-0 errata84 (Neustadt) Remark: Browsing DNS, no change being made. Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 561, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 485, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dns/ptr_record.py", line 230, in lookup filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValue('subnet', superordinate['subnet']), escape=True)) File "%PY2.7%/univention/admin/handlers/__init__.py", line 429, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'
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.
reported again: Version: 4.4-6 errata814 (Blumenthal) Remark: occurred when selecting dns zone from left panel on DNS module screen Error: Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) File "%PY2.7%/notifier/threads.py", line 80, in _run result = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function(*tmp, **self._kwargs) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 605, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 681, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit, **kwargs) File "%PY2.7%/univention/admin/handlers/__init__.py", line 1737, in lookup filter_s = cls.lookup_filter_superordinate(filter_s, superordinate) File "%PY2.7%/univention/admin/handlers/dns/ptr_record.py", line 211, in lookup_filter_superordinate filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValue('subnet', superordinate['subnet']), escape=True)) File "%PY2.7%/univention/admin/handlers/__init__.py", line 478, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'
Version: 5.0-1 errata310 Remark: Was trying to write a DynamicDNS application using Univention's LDAP- please feel free to reach out with questions because I'm not sure if I'm doing this properly or not.
2023081821000165 5.0-2 errata703 Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) Traceback (most recent call last): File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 612, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden, allow_asterisks=USE_ASTERISKS) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 677, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit, **kwargs) File "%PY3%/univention/admin/handlers/__init__.py", line 1792, in lookup filter_s = cls.lookup_filter_superordinate(filter_s, superordinate) File "%PY3%/univention/admin/handlers/dns/ptr_record.py", line 221, in lookup_filter_superordinate filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValueDecoded('subnet', superordinate['subnet']), escape=True)) File "%PY3%/univention/admin/handlers/__init__.py", line 478, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'
2023122621000231 5.0-6 errata904 Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) Traceback (most recent call last): File "%PY3%/univention/management/console/modules/decorators.py", line 259, in _run result = self._function(*args, **kwargs) # type: Union[BaseException, _T] File "%PY3%/univention/management/console/modules/udm/__init__.py", line 601, in query result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden, allow_asterisks=USE_ASTERISKS) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 681, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit, **kwargs) File "%PY3%/univention/admin/handlers/__init__.py", line 1802, in lookup filter_s = cls.lookup_filter_superordinate(filter_s, superordinate) File "%PY3%/univention/admin/handlers/dns/ptr_record.py", line 220, in lookup_filter_superordinate filter.expressions.append(univention.admin.filter.expression('zoneName', superordinate.mapping.mapValueDecoded('subnet', superordinate['subnet']), escape=True)) File "%PY3%/univention/admin/handlers/__init__.py", line 479, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'subnet'