Bug 833505 - ipa-client-install crashes when --hostname is given
ipa-client-install crashes when --hostname is given
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 11:48 EDT by Dmitri Pal
Modified: 2013-06-20 13:23 EDT (History)
4 users (show)

See Also:
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 04:15:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 03:22:21 EST

  None (edit)
Description Dmitri Pal 2012-06-19 11:48:56 EDT
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 Product and Program Management 2012-07-10 02:21:25 EDT
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 Product and Program Management 2012-07-10 19:28:44 EDT
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 06:12:00 EDT
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/c8abd24ebe612a3a0d415cece508b94a57c636fe
Comment 4 Jenny Galipeau 2012-09-25 12:50:15 EDT
automated regression test already exists this was upstream only issue
Comment 7 Michael Gregg 2013-01-21 19:38:15 EST
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 18:13:59 EST
This bug is actually for crashing when /etc/sysconfig/network is missing right?
Comment 9 Michael Gregg 2013-01-22 18:22:10 EST
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 06:17:33 EST
Confirming that this bug was caused by missing /etc/sysconfig/network (and --hostname option being used).
Comment 11 Michael Gregg 2013-01-23 18:54:35 EST
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@TESTRELM.COM: 
k[root@iota ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin@TESTRELM.COM

Valid starting     Expires            Service principal
01/23/13 18:53:18  01/24/13 18:53:15  krbtgt/TESTRELM.COM@TESTRELM.COM
Comment 13 errata-xmlrpc 2013-02-21 04:15:45 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.

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.