Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1117723

Summary: IPA fails to delete DNS records for enrolled host
Product: Red Hat Enterprise Linux 6 Reporter: Stephen Benjamin <stbenjam>
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED NOTABUG QA Contact: Namita Soman <nsoman>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5CC: mbasti, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-09 10:42:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1112222    

Description Stephen Benjamin 2014-07-09 09:20:03 UTC
Description of problem:
When deleting hosts with --updatedns=True, IPA fails to find the DNS records.


Version-Release number of selected component (if applicable):
ipa-admintools-3.0.0-37.el6.x86_64
ipa-pki-common-theme-9.0.3-7.el6.noarch
ipa-pki-ca-theme-9.0.3-7.el6.noarch
ipa-python-3.0.0-37.el6.x86_64
ipa-client-3.0.0-37.el6.x86_64
ipa-server-3.0.0-37.el6.x86_64
ipa-server-selinux-3.0.0-37.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Enroll a host in an IPA server that was configured for DNS
2. IPA automatically creates DNS records
3. Delete the host with ipa host-del <hostname> --updatedns=True

Actual results:
DNS records are not deleted

The records exist...

[root@ipa01 httpd]# ipa dnsrecord-show katello.example.org realm-rhel6
Record name: realm-rhel6
A record: 192.168.100.147

[root@ipa01 httpd]# ipa dnsrecord-show 100.168.192.in-addr.arpa. 147
Record name: 147
PTR record: realm-rhel6.katello.example.org.


But the API says the records are NotFound:

[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG: raw:
host_del((u'realm-rhel6.katello.example.org',), updatedns=True)
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG:
host_del((u'realm-rhel6.katello.example.org',), updatedns=True)
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG: raw:
service_find(u'realm-rhel6.katello.example.org')
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG:
service_find(u'realm-rhel6.katello.example.org', all=False, raw=False,
no_members=False, pkey_only=False)
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG: raw:
dnszone_show(u'katello.example.org')
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG:
dnszone_show(u'katello.example.org', rights=False, all=False, raw=False)
[Tue Jul 08 14:17:59 2014] [error] ipa: INFO:
realm-capsule.ORG:
host_del((u'realm-rhel6.katello.example.org',), updatedns=True):
NotFound
[Tue Jul 08 14:17:59 2014] [error] ipa: DEBUG: response: NotFound:
realm-rhel6.katello.example.org: host not found


Expected results:
DNS records are deleted (as in the latest upstream version - freeipa-server-3.3.5-1.fc20.x86_64):

[Wed Jul 09 09:11:12.780174 2014] [:error] [pid 22883] ipa: DEBUG: raw: host_del((u'fedora456.bitbin.de',), updatedns=True, version=u'2.65')
[Wed Jul 09 09:11:12.780342 2014] [:error] [pid 22883] ipa: DEBUG: host_del((u'fedora456.bitbin.de',), updatedns=True, version=u'2.65')
[Wed Jul 09 09:11:12.784403 2014] [:error] [pid 22883] ipa: DEBUG: retrieving schema for SchemaCache url=ldapi://%2fvar%2frun%2fslapd-BITBIN-DE.socket conn=<ldap.ldapobject.SimpleLDAPObject instance at 0x7f24b4c14bd8>
[Wed Jul 09 09:11:13.039536 2014] [:error] [pid 22883] ipa: DEBUG: raw: service_find(u'fedora456.bitbin.de')
[Wed Jul 09 09:11:13.039725 2014] [:error] [pid 22883] ipa: DEBUG: service_find(u'fedora456.bitbin.de', all=False, raw=False, no_members=False, pkey_only=False)
[Wed Jul 09 09:11:13.043095 2014] [:error] [pid 22883] ipa: DEBUG: raw: dnszone_show(u'bitbin.de')
[Wed Jul 09 09:11:13.043244 2014] [:error] [pid 22883] ipa: DEBUG: dnszone_show(u'bitbin.de', rights=False, all=False, raw=False)
[Wed Jul 09 09:11:13.047731 2014] [:error] [pid 22883] ipa: DEBUG: raw: dnsrecord_find(u'bitbin.de', None, idnsname=u'fedora456')
[Wed Jul 09 09:11:13.048055 2014] [:error] [pid 22883] ipa: DEBUG: dnsrecord_find(u'bitbin.de', None, idnsname=u'fedora456', structured=False, all=False, raw=False, pkey_only=False)
[Wed Jul 09 09:11:13.053805 2014] [:error] [pid 22883] ipa: DEBUG: deleting ipaddr 10.7.13.132
[Wed Jul 09 09:11:13.053988 2014] [:error] [pid 22883] ipa: DEBUG: raw: dnszone_find(None)
[Wed Jul 09 09:11:13.054191 2014] [:error] [pid 22883] ipa: DEBUG: dnszone_find(None, forward_only=False, all=False, raw=False, pkey_only=False)
[Wed Jul 09 09:11:13.058742 2014] [:error] [pid 22883] ipa: DEBUG: raw: dnsrecord_del(u'13.7.10.in-addr.arpa.', u'132', ptrrecord=u'fedora456.bitbin.de')
[Wed Jul 09 09:11:13.059075 2014] [:error] [pid 22883] ipa: DEBUG: dnsrecord_del(u'13.7.10.in-addr.arpa.', u'132', ptrrecord=(u'fedora456.bitbin.de.',), del_all=False, structured=False)
[Wed Jul 09 09:11:13.062739 2014] [:error] [pid 22883] ipa: DEBUG: raw: dnsrecord_del(u'bitbin.de', u'fedora456', arecord=u'10.7.13.132')
[Wed Jul 09 09:11:13.063052 2014] [:error] [pid 22883] ipa: DEBUG: dnsrecord_del(u'bitbin.de', u'fedora456', arecord=(u'10.7.13.132',), del_all=False, structured=False)
[Wed Jul 09 09:11:13.616730 2014] [:error] [pid 22883] ipa: INFO: admin: host_del((u'fedora456.bitbin.de',), updatedns=True, version=u'2.65'): SUCCESS

Comment 2 Stephen Benjamin 2014-07-09 10:42:15 UTC
Missing permissions - Adding this worked:

ipa privilege-add-permission 'Satellite Capsule Host Management' --permission="read dns entries" --permission="remove dns entries" --permission="add dns entries" --permission="update dns entries"

Comment 3 Martin Bašti 2014-07-09 10:45:35 UTC
Related to: https://fedorahosted.org/freeipa/ticket/4329