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 833505

Summary: ipa-client-install crashes when --hostname is given
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: jgalipea, mgregg, mkosek, spoore
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:15:45 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:

Description Dmitri Pal 2012-06-19 15:48:56 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2840

{{{
$ sudo ipa-client-install --hostname=myhostname.idm.lab.bos.redhat.com
Discovery was successful!
Hostname: myhostname.idm.lab.bos.redhat.com
Realm: IDM.LAB.BOS.REDHAT.COM
DNS Domain: idm.lab.bos.redhat.com
IPA Server: vm-117.idm.lab.bos.redhat.com
BaseDN: dc=idm,dc=lab,dc=bos,dc=redhat,dc=com


Continue to configure the system with these values? [no]: y
Traceback (most recent call last):
  File "/sbin/ipa-client-install", line 1591, in <module>
    sys.exit(main())
  File "/sbin/ipa-client-install", line 1578, in main
    rval = install(options, env, fstore, statestore)
  File "/sbin/ipa-client-install", line 1228, in install
    ipaservices.backup_and_replace_hostname(fstore, statestore, options.hostname)
  File "/usr/lib/python2.7/site-packages/ipapython/platform/redhat.py", line 174, in backup_and_replace_hostname
    replacevars=replacevars)
  File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 978, in backup_config_and_replace_variables
    old_values = config_replace_variables(filepath, replacevars, appendvars)
  File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 817, in config_replace_variables
    orig_stat = os.stat(filepath)
OSError: [Errno 2] No such file or directory: '/etc/sysconfig/network'
}}}

tail /var/log/ipaclient-install.log
{{{
2012-06-13T15:35:10Z DEBUG will use domain: idm.lab.bos.redhat.com

2012-06-13T15:35:10Z DEBUG will use server: vm-117.idm.lab.bos.redhat.com

2012-06-13T15:35:10Z DEBUG will use cli_realm: IDM.LAB.BOS.REDHAT.COM

2012-06-13T15:35:10Z DEBUG will use cli_basedn: dc=idm,dc=lab,dc=bos,dc=redhat,dc=com

2012-06-13T15:35:13Z DEBUG args=/usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r IDM.LAB.BOS.REDHAT.COM
2012-06-13T15:35:13Z DEBUG stdout=
2012-06-13T15:35:13Z DEBUG stderr=Failed to open keytab '/etc/krb5.keytab': No such file or directory

2012-06-13T15:35:13Z DEBUG args=/bin/hostname myhostname.idm.lab.bos.redhat.com
2012-06-13T15:35:13Z DEBUG stdout=
2012-06-13T15:35:13Z DEBUG stderr=
2012-06-13T15:35:13Z DEBUG Backing up system configuration file '/etc/sysconfig/network'
2012-06-13T15:35:13Z DEBUG   -> Not backing up - '/etc/sysconfig/network' doesn't exist
}}}

Comment 1 RHEL Program Management 2012-07-10 06:21:25 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-10 23:28:44 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 3 Martin Kosek 2012-08-03 10:12:00 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/c8abd24ebe612a3a0d415cece508b94a57c636fe

Comment 4 Jenny Severance 2012-09-25 16:50:15 UTC
automated regression test already exists this was upstream only issue

Comment 7 Michael Gregg 2013-01-22 00:38:15 UTC
Verified against: ipa-client-3.0.0-9.el6.x86_64

Output from: ipa-client-install --hostname=zippyvm5.testrelm.com.nonexistent --server=zippyvm3.testrelm.com --domain=testrelm.com -p admin -w Secret123  -U

========== execution output ===============
Hostname: zippyvm5.testrelm.com.nonexistent
Realm: TESTRELM.COM
DNS Domain: testrelm.com
IPA Server: zippyvm3.testrelm.com
BaseDN: dc=testrelm,dc=com
Synchronizing time with KDC...
Enrolled in IPA realm TESTRELM.COM
Created /etc/ipa/default.conf
New SSSD config will be created
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm TESTRELM.COM
trying https://zippyvm3.testrelm.com/ipa/xml
Hostname (zippyvm5.testrelm.com.nonexistent) not found in DNS
Failed to update DNS records.
Adding SSH public key from /etc/ssh/ssh_host_dsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
Forwarding 'host_mod' to server u'https://zippyvm3.testrelm.com/ipa/xml'
Could not update DNS SSHFP records.
SSSD enabled
Configured /etc/openldap/ldap.conf
NTP enabled
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Client configuration complete.

============== end of output ==============

Comment 8 Scott Poore 2013-01-22 23:13:59 UTC
This bug is actually for crashing when /etc/sysconfig/network is missing right?

Comment 9 Michael Gregg 2013-01-22 23:22:10 UTC
It's hard to tell. That is the error message in the original output, but it's unclear if that is what this bug is about. The original description is "ipa-client-install crashes when --hostname is given". No mention of /etc/sysconfig/network.

I suppose we will need to let somebody like Simo comment.

Comment 10 Martin Kosek 2013-01-23 11:17:33 UTC
Confirming that this bug was caused by missing /etc/sysconfig/network (and --hostname option being used).

Comment 11 Michael Gregg 2013-01-23 23:54:35 UTC
Bug revierified.

I removed /etc/sysconfig/network and ran ipa-client-install again. 

It worked well. 

[root@iota ~]# mv /etc/sysconfig/network /root/.
[root@iota ~]# ipa-client-install  -U --domain=testrelm.com --realm=TESTRELM.COM -p admin -w Secret123 --server=blademtv1.testrelm.com
Hostname: iota.testrelm.com
Realm: TESTRELM.COM
DNS Domain: testrelm.com
IPA Server: blademtv1.testrelm.com
BaseDN: dc=testrelm,dc=com

Synchronizing time with KDC...
Enrolled in IPA realm TESTRELM.COM
Created /etc/ipa/default.conf
New SSSD config will be created
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm TESTRELM.COM
trying https://blademtv1.testrelm.com/ipa/xml
Hostname (iota.testrelm.com) not found in DNS
DNS server record set to: iota.testrelm.com -> 10.14.5.188
Adding SSH public key from /etc/ssh/ssh_host_dsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
Forwarding 'host_mod' to server u'http://blademtv1.testrelm.com/ipa/xml'
SSSD enabled
Configured /etc/openldap/ldap.conf
Unable to find 'admin' user with 'getent passwd admin'!
Recognized configuration: SSSD
NTP enabled
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Client configuration complete.
[root@iota ~]# kinit admin
Password for admin: 
k[root@iota ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin

Valid starting     Expires            Service principal
01/23/13 18:53:18  01/24/13 18:53:15  krbtgt/TESTRELM.COM

Comment 13 errata-xmlrpc 2013-02-21 09:15:45 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