Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1072502 - running ipa-server-install --setup-dns results in a crash
running ipa-server-install --setup-dns results in a crash
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Martin Kosek
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-04 11:58 EST by Michael Wang
Modified: 2015-03-05 05:10 EST (History)
6 users (show)

See Also:
Fixed In Version: ipa-4.1.0-14.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 05:10:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/ipaserver-install.log (19.21 KB, text/plain)
2014-03-04 11:58 EST, Michael Wang
no flags Details
snip from automation log (12.17 KB, text/plain)
2015-01-16 01:10 EST, Kaleem
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0442 normal SHIPPED_LIVE Moderate: ipa security, bug fix, and enhancement update 2015-03-05 09:50:39 EST

  None (edit)
Description Michael Wang 2014-03-04 11:58:18 EST
Created attachment 870544 [details]
/var/log/ipaserver-install.log

Description of problem:

running ipa-server-install --setup-dns results in a crash

Version-Release number of selected component (if applicable):
RHEL 7 beta snapshot 8

How reproducible:


Steps to Reproduce:
[root@idm1 yum.repos.d]# 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.

WARNING: conflicting time&date synchronization service 'chronyd' will be disabled
in favor of ntpd

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 [idm1.linux.lab]: 

Warning: skipping DNS resolution of host idm1.linux.lab
The domain name has been determined based on the host name.

Please confirm the domain name [linux.lab]: 

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

Please provide a realm name [LINUX.LAB]: 
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]: 
Enter the IP address of DNS forwarder to use, or press Enter to finish.
Enter IP address for a DNS forwarder: 192.168.0.40
DNS forwarder 192.168.0.40 added
Enter IP address for a DNS forwarder: 192.168.0.60
DNS forwarder 192.168.0.60 added
Enter IP address for a DNS forwarder: 
Do you want to configure the reverse zone? [yes]: 
Please specify the reverse zone name [0.168.192.in-addr.arpa.]: 
Using reverse zone 0.168.192.in-addr.arpa.

The IPA Master Server will be configured with:
Hostname:      idm1.linux.lab
IP address:    192.168.0.80
Domain name:   linux.lab
Realm name:    LINUX.LAB

BIND DNS server will be configured to serve IPA domain with:
Forwarders:    192.168.0.40, 192.168.0.60
Reverse zone:  0.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
. . . 


Actual results:

  [2/38]: creating directory server instance
ipa         : CRITICAL failed to create ds instance Command '/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpTbUKBx' returned non-zero exit status 1
ipa         : CRITICAL Failed to restart the directory server (Command '/bin/systemctl restart dirsrv@LINUX-LAB.service' returned non-zero exit status 1). See the installation log for details.
  [3/38]: adding default schema
Unexpected error - see /var/log/ipaserver-install.log for details:
IOError: [Errno 2] No such file or directory: '/etc/dirsrv/slapd-LINUX-LAB//schema/60kerberos.ldif'

Expected results:
completion of install without errors.

Additional info:
Comment 3 Dmitri Pal 2014-03-04 12:44:14 EST
The DNS name for the system was resolvable but there was no reverse DNS entry. This is why the installation failed. 
Adding reverse record resolved the issue.

IMO we should fail cleaner in this case and with a good actionable error message.
Comment 4 Michael Wang 2014-03-04 12:47:18 EST
I did indeed confirm that this issues goes away if I have a reverse lookup record--thank you. Though I could not recover from the crash install using the command "ipa-server-install --uninstall" and had to revert to an earlier snapshot of the server.  Regardless, the root cause of this issue has been identified. Thanks!
Mike
Comment 5 Martin Kosek 2014-03-05 04:11:30 EST
I agree, we seem to have a gap in the validation mechanism.

With --setup-dns flag, some hostname the reverse record validation is skipped. We also skip adding a record in /etc/hosts when hostname is resolvable, but apparently DS instance cannot be created what that is missing.

We should extend get_server_ip_address function in installutils.py to add these record in this case. I will open an upstream ticket.
Comment 6 Martin Kosek 2014-03-05 04:16:21 EST
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4220
Comment 7 Martin Kosek 2014-03-05 06:34:57 EST
I am lowering the severity to medium given this is an error in validation only and installation worked after reverse record was added.
Comment 11 Martin Bašti 2014-12-16 12:28:46 EST
The fix was accidentaly removed by another patch.

https://git.fedorahosted.org/cgit/freeipa.git/diff/ipaserver/install/installutils.py?id=579b614e3f0501138d3fbb669cf6ae85adb3ac56

This has to be fixed again.
Comment 12 Martin Kosek 2014-12-17 07:31:48 EST
I created https://fedorahosted.org/freeipa/ticket/4817 for the regression.
Comment 15 Kaleem 2015-01-16 01:09:33 EST
Verified.

IPA version:
============
ipa-server-4.1.0-15.el7.x86_64

Snip of automation log has been attached.
Comment 16 Kaleem 2015-01-16 01:10:31 EST
Created attachment 980750 [details]
snip from automation log
Comment 18 errata-xmlrpc 2015-03-05 05:10:35 EST
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.

https://rhn.redhat.com/errata/RHSA-2015-0442.html

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