Univention Bugzilla – Bug 32235
dns/host_record with no IP is not shown / deletable
Last modified: 2017-07-11 17:04:26 CEST
I created an dns/host_record without an IP address by accident. This is possible from both the UMC and the CLI. After that the entry is not shown in the list of zone entries. Only ldapsearch finds the entry. Creating an entry fails with "E: object exists: relativeDomainName=foo,zoneName=pmhahn.de,dc=phahn,dc=dev" zone="$(udm dns/forward_zone list | sed -ne 's/^DN: //;T;p;q')" udm dns/host_record create --superordinate "$zone" --set name=foo udm dns/host_record list --superordinate "$zone" univention-ldapsearch -xLLLb "$zone" relativeDomainName=foo Theres a discepancy in the handler#lookup() function, which requires one of the 3 RRs 'aRecord', 'aAAARecord', or 'mXRecord' being set, but all properties are defines as optional (required=0).
Similar for txt_record: There at least one entry should be required. index db6f32a..d5b89ae 100644 --- a/branches/ucs-3.2/ucs-3.2-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/dns/txt_record.py +++ b/branches/ucs-3.2/ucs-3.2-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/dns/txt_record.py @@ -78,7 +78,7 @@ property_descriptions={ syntax = univention.admin.syntax.string, multivalue = True, options = [], - required = False, + required = True, may_change = True ) } Also notice, that a host_record created with only an TXT entry is _not_ shown in UMC, but the the CLI does find it as a dns/txt_record type. (both UDM modules overlap when handling TXT records.)
The entries are still visible in the LDAP navigation and can be modified there.
It is displayed in the LDAP directory tree because it contains univentionObjectType: dns/host_record. The lookup() function is used if the search is for an explicit object type (like dns/host_record, or dns/dns). The LDAP directory doesn't use lookup() but it searchs for all objects and finds out the type via univention.admin.modules.objectType().
I stumbled on this today: # eval "$(ucr shell)" # udm dns/host_record create --superordinate "zoneName=univention.intranet,cn=dns,$ldap_base" --set name=foo Object created: relativeDomainName=foo,zoneName=univention.intranet,cn=dns,dc=univention,dc=intranet # udm dns/host_record remove --dn "relativeDomainName=foo,zoneName=univention.intranet,$ldap_base" E: object not found Reason is the filter which doesn't match because no aRecord/aAAARecord/mXRecord is set: univention-ldapsearch -LLL -b relativeDomainName=foo,zoneName=oldschool.local,cn=dns,ou=oldschool,dc=school,dc=local '(&(objectClass=dNSZone)(!(relativeDomainName=@))(!(zoneName=*.in-addr.arpa))(!(zoneName=*.ip6.arpa))(!(cNAMERecord=*))(!(sRVRecord=*))(|(aRecord=*)(aAAARecord=*)(mXRecord=*))(zoneName=oldschool.local))'
*** Bug 24652 has been marked as a duplicate of this bug. ***
*** Bug 31969 has been marked as a duplicate of this bug. ***
I fixed this during Bug #40839. The detection of dns/host_record's without aRecord/aAAARecord/txtRecord/mxRecord is now possible if univentionObjectType=dns/host_record is set. What is missing is setting any of the properties to required. REOPEN this bug if this should be done. *** This bug has been marked as a duplicate of bug 40839 ***