Bug 44320 - dns/host_record without IP address is unaccessible/undeleteable
dns/host_record without IP address is unaccessible/undeleteable
Status: RESOLVED DUPLICATE of bug 40839
Product: UCS
Classification: Unclassified
Component: UMC - DNS
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Philipp Hahn
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-07 12:11 CEST by Philipp Hahn
Modified: 2023-10-09 08:37 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-04-07 12:11:58 CEST
If I create a "dns/host_record" entry without IPv4 and IPv6 addresses, that entry can't be managed by that UDM module, as the "lookup()" filter does not match:

 zone=$(udm dns/forward_zone list|sed -ne 's/^DN: //p;T;q')
 udm dns/host_record create --superordinate "$zone" --set name=test
 udm dns/host_record list --superordinate "$zone" --filter name=test
 # name=test
 
 univention-ldapsearch -LLLo ldif-wrap=no -b "relativeDomainName=test,$zone" -s base
 # dn: relativeDomainName=test,zoneName=phahn.qa,cn=dns,dc=phahn,dc=qa
 # objectClass: dNSZone
 # objectClass: top
 # objectClass: univentionObject
 # univentionObjectType: dns/host_record
 # relativeDomainName: test
 # dNSTTL: 10800
 # zoneName: phahn.qa

The entry can be removed using the low-level LDAP tools:
 ldapdelete -Y EXTERNAL -H ldapi:/// "relativeDomainName=test,$zone"


/usr/share/pyshared/univention/admin/handlers/dns/host_record.py:
>        filter = univention.admin.filter.conjunction('&', [
...
>                univention.admin.filter.conjunction('|', [
>                        univention.admin.filter.expression('aRecord', '*'),
>                        univention.admin.filter.expression('aAAARecord', '*'),
>                        univention.admin.filter.expression('mXRecord', '*'),
None of them matches as no IP is assigned.

Perhaps we should add a generic '(|(...)(univentionObjectType=$module))'?
Comment 1 Philipp Hahn univentionstaff 2023-10-09 08:37:05 CEST
Works for me since UCS 4.2 with git:18746283071edd46d06602f4b76c621949d43874 for Bug #40839 with added
+ univention.admin.filter.expression('tXTRecord', '*'),
+ univention.admin.filter.expression('univentionObjectType', module),  # host record without any record


zone=$(udm dns/forward_zone list|sed -ne 's/^DN: //p;T;q')
udm dns/host_record create --superordinate "$zone" --set name=test
udm dns/host_record list --superordinate "$zone" --filter name=test
udm dns/host_record remove --dn "relativeDomainName=test,$zone"

*** This bug has been marked as a duplicate of bug 40839 ***