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 924078 - Replica installation fails if forward zone is not present
Summary: Replica installation fails if forward zone is not present
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Michael Gregg
URL:
Whiteboard:
Depends On:
Blocks: 1034478
TreeView+ depends on / blocked
 
Reported: 2013-03-21 06:56 UTC by Martin Kosek
Modified: 2014-08-05 11:17 UTC (History)
4 users (show)

Fixed In Version: ipa-3.2.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1034478 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:59:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Kosek 2013-03-21 06:56:29 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/3496

Replica file preparation - no `--ip-address` option is present, but the vm-035 is installed with DNS (realm R.TEST):
{{{
ipa-replica-prepare -p password vm-070.example.com
Preparing replica for vm-070.example.com from vm-035.example.com
Creating SSL certificate for the Directory Server
Creating SSL certificate for the dogtag Directory Server
Creating SSL certificate for the Web Server
Exporting RA certificate
Copying additional files
Finalizing configuration
Packaging replica information into /var/lib/ipa/replica-info-vm-070.example.com.gpg
}}}


Now on replica - no `--setup-dns` option is present:
{{{
ipa-replica-install replica-info-vm-070.example.com.gpg 
Directory Manager (existing master) password: 

...

Done configuring NTP daemon (ntpd).

Your system may be partly configured.
Run /usr/sbin/ipa-server-install --uninstall to clean up.

Unexpected error - see /var/log/ipareplica-install.log for details:
NotFound: example.com: DNS zone not found
}}}

/var/log/ipareplica-install.log:
{{{
{{{2013-03-07T16:53:32Z DEBUG dnsrecord_add(u'r.test', u'_ntp._udp', a_extra_create_reverse=False, aaaa_extra_create_reverse=False, srvrecord=(u'0 100 123 vm-070.example.com.',), force=False, structured=False, all=False, raw=False)
2013-03-07T16:53:32Z DEBUG raw: dnsrecord_add(u'example.com', u'vm-070', arecord=u'192.0.2.70')
2013-03-07T16:53:32Z DEBUG dnsrecord_add(u'example.com', u'vm-070', arecord=(u'192.0.2.70',), a_extra_create_reverse=False, aaaa_extra_create_reverse=False, force=False, structured=False, all=False, raw=False)
2013-03-07T16:53:32Z INFO   File "/usr/lib/python2.6/site-packages/ipaserver/install/installutils.py", line 614, in run_script
    return_value = main_function()

  File "/usr/sbin/ipa-replica-install", line 470, in main
    install_dns_records(config, options)

  File "/usr/sbin/ipa-replica-install", line 267, in install_dns_records
    reverse_zone, options.conf_ntp)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/bindinstance.py", line 694, in add_master_dns_records
    self.__add_self()

  File "/usr/lib/python2.6/site-packages/ipaserver/install/bindinstance.py", line 607, in __add_self
    add_fwd_rr(self.host_domain, self.host, self.ip_address)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/bindinstance.py", line 315, in add_fwd_rr
    add_rr(zone, host, "A", ip_address)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/bindinstance.py", line 306, in add_rr
    api.Command.dnsrecord_add(unicode(zone), unicode(name), **addkw)

  File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 435, in __call__
    ret = self.run(*args, **options)

  File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 747, in run
    return self.execute(*args, **options)

  File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 1078, in execute
    'oname': self.api.Object[parent].object_name,

2013-03-07T16:53:32Z INFO The ipa-replica-install command failed, exception: NotFound: idm.lab.eng.brq.redhat.com: DNS zone not found
}}}

IPA version: ipa-server-3.0.0-25.el6.x86_64

Comment 1 Rob Crittenden 2013-04-02 13:46:27 UTC
Fixed upstream:

master: ff01a08ffc85c069f37692ad8307bf10e8bd1e29

ipa-3-1: b50ebfbc367ac2bf37e8efb7ce53f1b8f856de9a

Comment 4 Scott Poore 2014-02-20 00:33:13 UTC
Verified.

Version ::

ipa-server-3.3.3-18.el7.x86_64

Results ::

**********************************************************************
******* ON MASTER:
**********************************************************************

0.  Check some things on host config

[root@rhel7-7 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.122.77 rhel7-7.example.com
192.168.122.78 rhel7-8.example.com
[root@rhel7-7 ~]# cat /etc/hostname
rhel7-7.example.com

1.  run ipa-server-install with --setup-dns

[root@rhel7-7 ~]# ipa-server-install --setup-dns

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: yes
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.


Server host name [rhel7-7.example.com]: 

Warning: skipping DNS resolution of host rhel7-7.example.com
The domain name has been determined based on the host name.

Please confirm the domain name [example.com]: testrelm.test

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [TESTRELM.TEST]: 
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password: 
Password (confirm): 

The IPA server requires an administrative user, named 'admin'.
This user is a regular system account used for IPA server administration.

IPA admin password: 
Password (confirm): 

Do you want to configure DNS forwarders? [yes]: yes
Enter the IP address of DNS forwarder to use, or press Enter to finish.
Enter IP address for a DNS forwarder: 192.168.122.1
DNS forwarder 192.168.122.1 added
Enter IP address for a DNS forwarder: 
Do you want to configure the reverse zone? [yes]: yes
Please specify the reverse zone name [122.168.192.in-addr.arpa.]: 
Using reverse zone 122.168.192.in-addr.arpa.

The IPA Master Server will be configured with:
Hostname:      rhel7-7.example.com
IP address:    192.168.122.77
Domain name:   testrelm.test
Realm name:    TESTRELM.TEST

BIND DNS server will be configured to serve IPA domain with:
Forwarders:    192.168.122.1
Reverse zone:  122.168.192.in-addr.arpa.

Continue to configure the system with these values? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv): Estimated time 1 minute
  [1/38]: creating directory server user
  [2/38]: creating directory server instance
  [3/38]: adding default schema
  [4/38]: enabling memberof plugin
  [5/38]: enabling winsync plugin
  [6/38]: configuring replication version plugin
  [7/38]: enabling IPA enrollment plugin
  [8/38]: enabling ldapi
  [9/38]: configuring uniqueness plugin
  [10/38]: configuring uuid plugin
  [11/38]: configuring modrdn plugin
  [12/38]: configuring DNS plugin
  [13/38]: enabling entryUSN plugin
  [14/38]: configuring lockout plugin
  [15/38]: creating indices
  [16/38]: enabling referential integrity plugin
  [17/38]: configuring certmap.conf
  [18/38]: configure autobind for root
  [19/38]: configure new location for managed entries
  [20/38]: configure dirsrv ccache
  [21/38]: enable SASL mapping fallback
  [22/38]: restarting directory server
  [23/38]: adding default layout
  [24/38]: adding delegation layout
  [25/38]: creating container for managed entries
  [26/38]: configuring user private groups
  [27/38]: configuring netgroups from hostgroups
  [28/38]: creating default Sudo bind user
  [29/38]: creating default Auto Member layout
  [30/38]: adding range check plugin
  [31/38]: creating default HBAC rule allow_all
  [32/38]: initializing group membership
  [33/38]: adding master entry
  [34/38]: configuring Posix uid/gid generation
  [35/38]: adding replication acis
  [36/38]: enabling compatibility plugin
  [37/38]: tuning directory server
  [38/38]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring certificate server (pki-tomcatd): Estimated time 3 minutes 30 seconds
  [1/22]: creating certificate server user
  [2/22]: configuring certificate server instance
  [3/22]: stopping certificate server instance to update CS.cfg
  [4/22]: disabling nonces
  [5/22]: set up CRL publishing
  [6/22]: starting certificate server instance
  [7/22]: creating RA agent certificate database
  [8/22]: importing CA chain to RA certificate database
  [9/22]: fixing RA database permissions
  [10/22]: setting up signing cert profile
  [11/22]: set certificate subject base
  [12/22]: enabling Subject Key Identifier
  [13/22]: enabling CRL and OCSP extensions for certificates
  [14/22]: setting audit signing renewal to 2 years
  [15/22]: configuring certificate server to start on boot
  [16/22]: restarting certificate server
  [17/22]: requesting RA certificate from CA
  [18/22]: issuing RA agent certificate
  [19/22]: adding RA agent as a trusted user
  [20/22]: configure certificate renewals
  [21/22]: configure Server-Cert certificate renewal
  [22/22]: Configure HTTP to proxy connections
Done configuring certificate server (pki-tomcatd).
Configuring Kerberos KDC (krb5kdc): Estimated time 30 seconds
  [1/10]: adding sasl mappings to the directory
  [2/10]: adding kerberos container to the directory
  [3/10]: configuring KDC
  [4/10]: initialize kerberos container
  [5/10]: adding default ACIs
  [6/10]: creating a keytab for the directory
  [7/10]: creating a keytab for the machine
  [8/10]: adding the password extension to the directory
  [9/10]: starting the KDC
  [10/10]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
  [1/2]: starting kadmin 
  [2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa_memcached
  [1/2]: starting ipa_memcached 
  [2/2]: configuring ipa_memcached to start on boot
Done configuring ipa_memcached.
Configuring ipa-otpd
  [1/2]: starting ipa-otpd 
  [2/2]: configuring ipa-otpd to start on boot
Done configuring ipa-otpd.
Configuring the web interface (httpd): Estimated time 1 minute
  [1/14]: setting mod_nss port to 443
  [2/14]: setting mod_nss password file
  [3/14]: enabling mod_nss renegotiate
  [4/14]: adding URL rewriting rules
  [5/14]: configuring httpd
  [6/14]: setting up ssl
  [7/14]: setting up browser autoconfig
  [8/14]: publish CA cert
  [9/14]: creating a keytab for httpd
  [10/14]: clean up any existing httpd ccache
  [11/14]: configuring SELinux for httpd
  [12/14]: configure httpd ccache
  [13/14]: restarting httpd
  [14/14]: configuring httpd to start on boot
Done configuring the web interface (httpd).
Applying LDAP updates
Restarting the directory server
Restarting the KDC
Configuring DNS (named)
  [1/11]: adding DNS container
  [2/11]: setting up our zone
  [3/11]: setting up reverse zone
  [4/11]: setting up our own record
  [5/11]: setting up records for other masters
  [6/11]: setting up CA record
  [7/11]: setting up kerberos principal
  [8/11]: setting up named.conf
  [9/11]: restarting named
  [10/11]: configuring named to start on boot
  [11/11]: changing resolv.conf to point to ourselves
Done configuring DNS (named).

Global DNS configuration in LDAP server is empty
You can use 'dnsconfig-mod' command to set global DNS options that
would override settings in local named.conf files

Restarting the web server
==============================================================================
Setup complete

Next steps:
	1. You must make sure these network ports are open:
		TCP Ports:
		  * 80, 443: HTTP/HTTPS
		  * 389, 636: LDAP/LDAPS
		  * 88, 464: kerberos
		  * 53: bind
		UDP Ports:
		  * 88, 464: kerberos
		  * 53: bind
		  * 123: ntp

	2. You can now obtain a kerberos ticket using the command: 'kinit admin'
	   This ticket will allow you to use the IPA tools (e.g., ipa user-add)
	   and the web user interface.

Be sure to back up the CA certificate stored in /root/cacert.p12
This file is required to create replicas. The password for this
file is the Directory Manager password

2. Then have to remove the example.com domain because ipa-server-install adds it:

[root@rhel7-7 ~]# ipa dnszone-del example.com
------------------------------
Deleted DNS zone "example.com"
------------------------------

3.  Add a PTR record for the replica to avoid ipa-replica-install warnings about reverse resolution.

[root@rhel7-7 ~]# ipa dnsrecord-add 122.168.192.in-addr.arpa. 78 --ptr-rec=rhel7-8.example.com.
  Record name: 78
  PTR record: rhel7-8.example.com.


NOTE: this is the warning without this record.  So this step may not be necessary.

Connection check OK
ipa         : ERROR    Reverse DNS resolution of address 192.168.122.78 (rhel7-8.example.com) failed. Clients may not function properly. Please check your DNS setup. (Note that this check queries IPA DNS directly and ignores /etc/hosts.)
Configuring NTP daemon (ntpd)

4.  run ipa-replica-prepare WITHOUT --ip-address

[root@rhel7-7 ~]# ipa-replica-prepare -p $ADMINPW rhel7-8.example.com
Preparing replica for rhel7-8.example.com from rhel7-7.example.com
Creating SSL certificate for the Directory Server
Creating SSL certificate for the dogtag Directory Server
Saving dogtag Directory Server port
Creating SSL certificate for the Web Server
Exporting RA certificate
Copying additional files
Finalizing configuration
Packaging replica information into /var/lib/ipa/replica-info-rhel7-8.example.com.gpg
The ipa-replica-prepare command was successful

**********************************************************************
******* ON REPLICA:
**********************************************************************

5.  Download gpg replica info file:

[root@rhel7-8 rhqa_ipa]# sftp root@$MASTERIP:$gpgfile $gpgfile
Connected to 192.168.122.77.
Fetching /var/lib/ipa/replica-info-rhel7-8.example.com.gpg to /var/lib/ipa/replica-info-rhel7-8.example.com.gpg
/var/lib/ipa/replica-info-rhel7-8.example.com.gpg                    100%   37KB  37.0KB/s   00:01    

6.  run ipa-replica-install WITHOUT --setup-dns:

[root@rhel7-8 rhqa_ipa]# ipa-replica-install -U  -w $ADMINPW -p $ADMINPW $gpgfile
Run connection check to master
Check connection from replica to remote master 'rhel7-7.example.com':
   Directory Service: Unsecure port (389): OK
   Directory Service: Secure port (636): OK
   Kerberos KDC: TCP (88): OK
   Kerberos Kpasswd: TCP (464): OK
   HTTP Server: Unsecure port (80): OK
   HTTP Server: Secure port (443): OK

The following list of ports use UDP protocol and would need to be
checked manually:
   Kerberos KDC: UDP (88): SKIPPED
   Kerberos Kpasswd: UDP (464): SKIPPED

Connection from replica to master is OK.
Start listening on required ports for remote master check
Get credentials to log in to remote master
Check SSH connection to remote master
Execute check on remote master
Check connection from master to remote replica 'rhel7-8.example.com':
   Directory Service: Unsecure port (389): OK
   Directory Service: Secure port (636): OK
   Kerberos KDC: TCP (88): OK
   Kerberos KDC: UDP (88): OK
   Kerberos Kpasswd: TCP (464): OK
   Kerberos Kpasswd: UDP (464): OK
   HTTP Server: Unsecure port (80): OK
   HTTP Server: Secure port (443): OK

Connection from master to replica is OK.

Connection check OK
Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv): Estimated time 1 minute
  [1/34]: creating directory server user
  [2/34]: creating directory server instance
  [3/34]: adding default schema
  [4/34]: enabling memberof plugin
  [5/34]: enabling winsync plugin
  [6/34]: configuring replication version plugin
  [7/34]: enabling IPA enrollment plugin
  [8/34]: enabling ldapi
  [9/34]: configuring uniqueness plugin
  [10/34]: configuring uuid plugin
  [11/34]: configuring modrdn plugin
  [12/34]: configuring DNS plugin
  [13/34]: enabling entryUSN plugin
  [14/34]: configuring lockout plugin
  [15/34]: creating indices
  [16/34]: enabling referential integrity plugin
  [17/34]: configuring ssl for ds instance
  [18/34]: configuring certmap.conf
  [19/34]: configure autobind for root
  [20/34]: configure new location for managed entries
  [21/34]: configure dirsrv ccache
  [22/34]: enable SASL mapping fallback
  [23/34]: restarting directory server
  [24/34]: setting up initial replication
Starting replication, please wait until this has completed.
Update in progress, 4 seconds elapsed
Update succeeded

  [25/34]: updating schema
  [26/34]: setting Auto Member configuration
  [27/34]: enabling S4U2Proxy delegation
  [28/34]: initializing group membership
  [29/34]: adding master entry
  [30/34]: configuring Posix uid/gid generation
  [31/34]: adding replication acis
  [32/34]: enabling compatibility plugin
  [33/34]: tuning directory server
  [34/34]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring Kerberos KDC (krb5kdc): Estimated time 30 seconds
  [1/9]: adding sasl mappings to the directory
  [2/9]: writing stash file from DS
  [3/9]: configuring KDC
  [4/9]: creating a keytab for the directory
  [5/9]: creating a keytab for the machine
  [6/9]: adding the password extension to the directory
  [7/9]: enable GSSAPI for replication
  [8/9]: starting the KDC
  [9/9]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
  [1/2]: starting kadmin 
  [2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa_memcached
  [1/2]: starting ipa_memcached 
  [2/2]: configuring ipa_memcached to start on boot
Done configuring ipa_memcached.
Configuring the web interface (httpd): Estimated time 1 minute
  [1/13]: setting mod_nss port to 443
  [2/13]: setting mod_nss password file
  [3/13]: enabling mod_nss renegotiate
  [4/13]: adding URL rewriting rules
  [5/13]: configuring httpd
  [6/13]: setting up ssl
  [7/13]: publish CA cert
  [8/13]: creating a keytab for httpd
  [9/13]: clean up any existing httpd ccache
  [10/13]: configuring SELinux for httpd
  [11/13]: configure httpd ccache
  [12/13]: restarting httpd
  [13/13]: configuring httpd to start on boot
Done configuring the web interface (httpd).
Configuring ipa-otpd
  [1/2]: starting ipa-otpd 
  [2/2]: configuring ipa-otpd to start on boot
Done configuring ipa-otpd.
Applying LDAP updates
Restarting the directory server
Restarting the KDC
Restarting the web server

7.  Confirm expected message in /var/log/ipareplica-install.log:

[root@rhel7-8 rhqa_ipa]# grep -B 4 "Replica DNS records could not be added on master:" /var/log/ipareplica-install.log
2014-02-19T23:23:26Z DEBUG raw: dnszone_show(u'example.com')
2014-02-19T23:23:26Z DEBUG dnszone_show(u'example.com', rights=False, all=False, raw=False)
2014-02-19T23:23:26Z DEBUG Host domain (example.com) is different from DNS domain (testrelm.test)!
2014-02-19T23:23:26Z DEBUG Add DNS zone for host first.
2014-02-19T23:23:26Z INFO Replica DNS records could not be added on master: 'BindInstance' object has no attribute 'zonemgr'

Comment 5 Martin Kosek 2014-02-21 08:32:19 UTC
This is a valid reproduction though it revealed a (benign, AFAICT) issue in the installation code:

https://fedorahosted.org/freeipa/ticket/4186

But this is only about the error message, the filed issue no longer occur.

Comment 6 Ludek Smid 2014-06-13 10:59:31 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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