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 828687 - Unable to update dns when deleting host
Summary: Unable to update dns when deleting host
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-05 08:05 UTC by Steeve Goveas
Modified: 2015-05-20 15:36 UTC (History)
3 users (show)

Fixed In Version: ipa-3.0.0-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 09:15:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 0 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 08:22:21 UTC

Description Steeve Goveas 2012-06-05 08:05:54 UTC
Description of problem:
While deleting host with --updatedns, the deletion fails with error
"ipa: ERROR: PTR record does not contain 'hp-xw4200-01.rhts.eng.bos.redhat.com..'". Notice there are two trailing dots in the error message.


Version-Release number of selected component (if applicable):
ipa-server-2.2.0-16.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Add client A and PTR records in IPA DNS server
2. Add client with "ipa host-add" from the ipa server or ipa-join from the client machine.
3. Try deleting the client with ipa host-del updating dns
# ipa host-del <client host machine> --updatedns
  
Actual results:
Command exit with error message
ipa: ERROR: PTR record does not contain 'hp-xw4200-01.rhts.eng.bos.redhat.com..'

Expected results:
---------------------------------------------------
Deleted host "hp-xw4200-01.rhts.eng.bos.redhat.com" and updated DNS records
---------------------------------------------------

Additional info:

[root@ibm-hs22-05 ~]# ipa host-find
---------------
2 hosts matched
---------------
  Host name: hp-xw4200-01.rhts.eng.bos.redhat.com
  Principal name: host/hp-xw4200-01.rhts.eng.bos.redhat.com.BRQ.REDHAT.COM
  SSH public key fingerprint: A8:BA:43:C4:6D:D9:77:A0:60:18:C8:FF:FF:E3:F4:F2 (ssh-rsa), A4:4D:9C:F9:BA:B1:EA:47:20:A9:77:2A:80:10:49:89 (ssh-dss)
  Password: False
  Keytab: False
  Managed by: hp-xw4200-01.rhts.eng.bos.redhat.com

  Host name: ibm-hs22-05.rhts.eng.brq.redhat.com
  Principal name: host/ibm-hs22-05.rhts.eng.brq.redhat.com.BRQ.REDHAT.COM
  SSH public key fingerprint: 24:25:77:BB:CF:04:F6:CB:99:93:93:D9:88:81:B6:09 (ssh-dss), FA:B1:D8:F4:71:DC:11:3E:91:F9:D7:0B:10:C3:10:37 (ssh-rsa)
  Password: False
  Keytab: True
  Managed by: ibm-hs22-05.rhts.eng.brq.redhat.com
----------------------------
Number of entries returned 2
----------------------------

[root@ibm-hs22-05 ~]# ipa dnsrecord-find rhts.eng.bos.redhat.com. hp-xw4200-01
  Record name: hp-xw4200-01
  A record: 10.16.64.87
----------------------------
Number of entries returned 1
----------------------------

[root@ibm-hs22-05 ~]# ipa dnsrecord-find 64.16.10.in-addr.arpa. 87
  Record name: 87
  PTR record: hp-xw4200-01.rhts.eng.bos.redhat.com.
----------------------------
Number of entries returned 1
----------------------------

[root@ibm-hs22-05 ~]# ipa host-del hp-xw4200-01.rhts.eng.bos.redhat.com --updatedns
ipa: ERROR: PTR record does not contain 'hp-xw4200-01.rhts.eng.bos.redhat.com..'
[root@ibm-hs22-05 ~]# ipa host-find
---------------
2 hosts matched
---------------
  Host name: hp-xw4200-01.rhts.eng.bos.redhat.com
  Principal name: host/hp-xw4200-01.rhts.eng.bos.redhat.com.BRQ.REDHAT.COM
  SSH public key fingerprint: A8:BA:43:C4:6D:D9:77:A0:60:18:C8:FF:FF:E3:F4:F2 (ssh-rsa), A4:4D:9C:F9:BA:B1:EA:47:20:A9:77:2A:80:10:49:89 (ssh-dss)
  Password: False
  Keytab: False
  Managed by: hp-xw4200-01.rhts.eng.bos.redhat.com

  Host name: ibm-hs22-05.rhts.eng.brq.redhat.com
  Principal name: host/ibm-hs22-05.rhts.eng.brq.redhat.com.BRQ.REDHAT.COM
  SSH public key fingerprint: 24:25:77:BB:CF:04:F6:CB:99:93:93:D9:88:81:B6:09 (ssh-dss), FA:B1:D8:F4:71:DC:11:3E:91:F9:D7:0B:10:C3:10:37 (ssh-rsa)
  Password: False
  Keytab: True
  Managed by: ibm-hs22-05.rhts.eng.brq.redhat.com
----------------------------
Number of entries returned 2
----------------------------

[root@ibm-hs22-05 ~]# ipa host-del hp-xw4200-01.rhts.eng.bos.redhat.com
---------------------------------------------------
Deleted host "hp-xw4200-01.rhts.eng.bos.redhat.com"
---------------------------------------------------

[root@ibm-hs22-05 ~]# ipa dnsrecord-find rhts.eng.bos.redhat.com. hp-xw4200-01
  Record name: hp-xw4200-01
  A record: 10.16.64.87
----------------------------
Number of entries returned 1
----------------------------

[root@ibm-hs22-05 ~]# ipa dnsrecord-find 64.16.10.in-addr.arpa. 87
  Record name: 87
  PTR record: hp-xw4200-01.rhts.eng.bos.redhat.com.
----------------------------
Number of entries returned 1
----------------------------

[root@ibm-hs22-05 ~]# ipa host-find
--------------
1 host matched
--------------
  Host name: ibm-hs22-05.rhts.eng.brq.redhat.com
  Principal name: host/ibm-hs22-05.rhts.eng.brq.redhat.com.BRQ.REDHAT.COM
  SSH public key fingerprint: 24:25:77:BB:CF:04:F6:CB:99:93:93:D9:88:81:B6:09 (ssh-dss), FA:B1:D8:F4:71:DC:11:3E:91:F9:D7:0B:10:C3:10:37 (ssh-rsa)
  Password: False
  Keytab: True
  Managed by: ibm-hs22-05.rhts.eng.brq.redhat.com
----------------------------
Number of entries returned 1
----------------------------

Comment 2 Martin Kosek 2012-06-05 08:22:37 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2809

Comment 4 Martin Kosek 2012-08-07 14:33:30 UTC
I could not reproduce the bug:

# rpm -q ipa-server
ipa-server-2.2.0-16.el6.x86_64

# ipa host-add foo.idm.lab.bos.redhat.com --ip-address 10.16.78.100
---------------------------------------
Added host "foo.idm.lab.bos.redhat.com"
---------------------------------------
  Host name: foo.idm.lab.bos.redhat.com
  Principal name: host/foo.idm.lab.bos.redhat.com.BOS.REDHAT.COM
  Password: False
  Keytab: False
  Managed by: foo.idm.lab.bos.redhat.com

# ipa dnsrecord-find idm.lab.bos.redhat.com
  Record name: @
  NS record: vm-060.idm.lab.bos.redhat.com.
...
  Record name: foo
  A record: 10.16.78.100

# ipa dnsrecord-find 78.16.10.in-addr.arpa.
  Record name: 100
  PTR record: foo.idm.lab.bos.redhat.com.

# ipa host-del foo.idm.lab.bos.redhat.com --updatedns
-----------------------------------------
Deleted host "foo.idm.lab.bos.redhat.com"
-----------------------------------------

Steeve, can you please revise provided reproduction steps?

Comment 5 Martin Kosek 2012-08-27 10:34:25 UTC
I managed to finally reproduce this issue. The key is in the name of the zone that the host belongs to. It needs to be in a FQDN  form with a trailing dot:


# ipa dnszone-add example.com. --name-server=`hostname`
Administrator e-mail address [hostmaster.example.com.]: 
  Zone name: example.com.
  Authoritative nameserver: vm-055.idm.lab.bos.redhat.com.
  Administrator e-mail address: hostmaster.example.com.
  SOA serial: 1346063470
  SOA refresh: 3600
  SOA retry: 900
  SOA expire: 1209600
  SOA minimum: 3600
  BIND update policy: grant IDM.LAB.BOS.REDHAT.COM krb5-self * A; grant IDM.LAB.BOS.REDHAT.COM krb5-self
                      * AAAA; grant IDM.LAB.BOS.REDHAT.COM krb5-self * SSHFP;
  Active zone: TRUE
  Dynamic update: FALSE
  Allow query: any;
  Allow transfer: none;

# ipa host-add foo.example.com --ip-address=10.16.78.100
----------------------------
Added host "foo.example.com"
----------------------------
  Host name: foo.example.com
  Principal name: host/foo.example.com.BOS.REDHAT.COM
  Password: False
  Keytab: False
  Managed by: foo.example.com

# ipa dnsrecord-find 78.16.10.in-addr.arpa.
  Record name: 100
  PTR record: foo.example.com.
...

# ipa host-del foo.example.com --updatedns
ipa: ERROR: PTR record does not contain 'foo.example.com..'

Comment 7 Jenny Severance 2012-09-25 16:02:48 UTC
regression test automated in DNS test suite

Comment 10 Namita Soman 2012-12-18 04:14:41 UTC
Verified using:ipa-server-3.0.0-11.el6.x86_64

Test output:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 828687 Unable to update dns when deleting host
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [23:13:13] ::  Ip address is 10.16.96.83
  Zone name: llnewzone.
  Authoritative nameserver: nightcrawler.testrelm.com.
  Administrator e-mail address: ipaqar.redhat.com.
  SOA serial: 2010010701
  SOA refresh: 303
  SOA retry: 101
  SOA expire: 1202
  SOA minimum: 33
  SOA time to live: 55
  BIND update policy: grant TESTRELM.COM krb5-self * A; grant TESTRELM.COM krb5-self * AAAA; grant TESTRELM.COM krb5-self * SSHFP;
  Active zone: TRUE
  Dynamic update: FALSE
  Allow query: any;
  Allow transfer: none;
:: [   PASS   ] :: Adding a new zone to test with
-------------------------
Added host "tt.llnewzone"
-------------------------
  Host name: tt.llnewzone
  Principal name: host/tt.llnewzone
  Password: False
  Keytab: False
  Managed by: tt.llnewzone
:: [   PASS   ] :: Add a new host to test with
  PTR record: tt.llnewzone.
:: [   PASS   ] :: Make sure PTR record was added for the new host.
---------------------------
Deleted host "tt.llnewzone"
---------------------------
:: [   PASS   ] :: Try to delete the new host. This should pass
ipa: ERROR: 252: DNS resource record not found
ipa: ERROR: tt.llnewzone: host not found

Comment 12 errata-xmlrpc 2013-02-21 09:15:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0528.html


Note You need to log in before you can comment on or make changes to this bug.