Bug 772301

Summary: [RFE] Reverse DNS rec not created upon creation of fwd DNS rec
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0CC: bcook, dpal, jgalipea, mkosek, rcritten, shaines, sigbjorn, ssorce
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ipa-2.2.0-3.el6 Doc Type: Enhancement
Doc Text:
Cause: When a forward DNS record is created, no corresponding reverse record is created even when both forward and reverse zone is managed by IPA. Consequence: User always have to create manually both forward and reverse record, which is error-prone, especially for IPv6 records. Change: Both CLI and Web UI have now option to automatically create also reverse record when an IPv4 or IPv6 forward record is being created. Result: User does not have to create the reverse records manually which should reduce potential user errors.
Story Points: ---
Clone Of: 747414 Environment:
Last Closed: 2012-06-20 13:28:51 UTC Type: ---
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: 747414    
Bug Blocks:    

Description Dmitri Pal 2012-01-06 18:11:15 UTC
+++ This bug was initially created as a clone of Bug #747414 +++

Description of problem:
When a fwd DNS records is created, no corresponding reverse record is created. Not for IPv4 or IPv6. Both forward and reverse zones are located on the IPA instance.

This would be useful for both IPv4 and IPv6, however it's almost a requirement for IPv6 records as the reverse IPv6 records are anything but easy to deal with manually.

Version-Release number of selected component (if applicable):
2.1

How reproducible:
Every time

Steps to Reproduce:
1. Add a fwd DNS record
2. Look for the reverse record
3.
  
Actual results:
Reverse record not created

Expected results:
A optional tickbox for creating the reverse record at the same time as the forward record is created.

Additional info:

--- Additional comment from rcritten on 2011-10-20 09:11:27 EDT ---

One workaround is to add the DNS entries when creating the host:

$ ipa host-add foo.example.com --ip-address=192.168.100.1

--- Additional comment from sigbjorn on 2011-10-20 12:11:57 EDT ---

Yes, this works when adding new machines. However from time to time I'm adding other types of devices to DNS too, like switches, printers, wifi access points, etc.

--- Additional comment from dpal on 2011-10-20 12:55:05 EDT ---

It would make sense to have an optional parameter to create a reverse record. Imo it should be a part of the new DNS management API Martin is working on.

--- Additional comment from dpal on 2011-10-20 13:08:18 EDT ---

Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2009

Comment 1 Jenny Severance 2012-01-11 18:55:53 UTC
*** Bug 751178 has been marked as a duplicate of this bug. ***

Comment 4 Sigbjorn Lie 2012-03-18 12:22:51 UTC
I see this has been implemented in the 2.1.90 release. Great. 

Could this option also be ticked by default when adding a record?

Comment 5 Martin Kosek 2012-04-20 08:54:29 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: When a forward DNS record is created, no corresponding reverse record is created even when both forward and reverse zone is managed by IPA.
Consequence: User always have to create manually both forward and reverse record, which is error-prone, especially for IPv6 records.
Change: Both CLI and Web UI have now option to automatically create also reverse record when an IPv4 or IPv6 forward record is being created.
Result: User does not have to create the reverse records manually which should reduce potential user errors.

Comment 6 Jenny Severance 2012-05-02 17:23:19 UTC
verified :

# ipa host-add --ip-address=10.16.186.53 myhost.testrelm.com
--------------------------------
Added host "myhost.testrelm.com"
--------------------------------
  Host name: myhost.testrelm.com
  Principal name: host/myhost.testrelm.com
  Password: False
  Keytab: False


# ipa dnsrecord-find 186.16.10.in-addr.arpa. 53
  Record name: 53
  PTR record: myhost.testrelm.com.
----------------------------
Number of entries returned 1
----------------------------

version :

ipa-server-2.2.0-11.el6.i686

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-host-cli-46: Add host with DNS Record
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Reverse Zone: 65.16.10.in-addr.arpa.
:: [   LOG    ] :: EXECUTING: ipa host-add --ip-address=10.16.65.99 myhost.testrelm.com
:: [   PASS   ] :: Adding host with IP Address 10.16.65.99
:: [   LOG    ] :: Host name is as expected.
:: [   LOG    ] :: Principal name is as expected.
:: [   PASS   ] :: Verifying host was added with IP Address.
:: [   PASS   ] :: Checking for forward DNS entry
:: [   PASS   ] :: Checking for reverse DNS entry
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-host-cli-46: Add host with DNS Record

Comment 7 Sigbjorn Lie 2012-05-02 18:56:31 UTC
This RFE was the the "--a-create-reverse" option to the dnsrecord-add command.


# ipa dnsrecord-add test.com mytest --a-create-reverse --a-rec=192.168.186.53
  Record name: mytest
  A record: 192.168.186.53


# ipa dnsrecord-find 186.168.192.in-addr.arpa. 53
  Record name: 53
  PTR record: mytest.test.com.
----------------------------
Number of entries returned 1
----------------------------

Comment 8 Sigbjorn Lie 2012-05-02 19:18:12 UTC
And of course the "--aaaa-create-reverse" option.


# ipa dnsrecord-add test.com testipv6 --aaaa-ip-address=2001:1002:abab:100::10 \ --aaaa-create-reverse
  Record name: testipv6
  AAAA record: 2001:1002:abab:100::10


# ipa dnsrecord-find 0.0.1.0.b.a.b.a.2.0.0.1.1.0.0.2.ip6.arpa. \ 0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0
  Record name: 0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0
  PTR record: testipv6.test.com.
----------------------------
Number of entries returned 1
----------------------------

Comment 9 Jenny Severance 2012-05-02 19:28:09 UTC
Thanks Sigbjorn.  The description of the bug was not adequate I guess!

Comment 10 Jenny Severance 2012-05-02 21:35:56 UTC
added automated tests for ipv4 and ipv6 ..

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: bz772301 Reverse DNS rec not created upon creation of fwd DNS rec
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: EXECUTING: ipa dnszone-add 1.1.10.in-addr.arpa. --name-server=dhcp-186-52.testrelm.com --admin-email=ipaqar.redhat.com
:: [   PASS   ] :: Add ipv4 reverse zone
:: [   LOG    ] :: EXECUTING: ipa dnsrecord-add testrelm.com --a-create-reverse --a-rec=10.1.1.10 myhost
:: [   PASS   ] :: Add ipv4 dns record
:: [   PASS   ] :: Verify ipv4 forward record was added
:: [   PASS   ] :: Verify ipv4 reverse record was added
:: [   PASS   ] :: Delete reverse record
:: [   PASS   ] :: Cleanup ipv4 reverse zone added
:: [   LOG    ] :: EXECUTING: ipa dnszone-add 7.4.2.2.0.0.0.0.2.5.0.0.0.2.6.2.ip6.arpa. --name-server=dhcp-186-52.testrelm.com --admin-email=ipaqar.redhat.com
:: [   PASS   ] :: Add ipv6 reverse zone
:: [   LOG    ] :: EXECUTING: ipa dnsrecord-add testrelm.com --aaaa-ip-address=2620:52:0:2247:221:5eff:fe86:16b4 --aaaa-create-reverse myhost
:: [   PASS   ] :: Add ipv6 dns record
:: [   PASS   ] :: Verify ipv6 forward record was added
:: [   PASS   ] :: Verify ipv6 reverse record was added
:: [   PASS   ] :: Delete reverse record
:: [   PASS   ] :: Delete reverse zone
:: [   PASS   ] :: Delete forward record
:: [   LOG    ] :: Duration: 1m 8s
:: [   LOG    ] :: Assertions: 13 good, 0 bad
:: [   PASS   ] :: RESULT: bz772301 Reverse DNS rec not created upon creation of fwd DNS rec

Comment 13 errata-xmlrpc 2012-06-20 13:28:51 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/RHBA-2012-0819.html