diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-03-03 19:50:21 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-03-04 17:23:01 -0500 |
commit | 55f89dc68940e3a4376fb80e97dbd0f2773c6ed1 (patch) | |
tree | cd47a00d33f641bae0e1281046c74deaec843155 /ipa-client | |
parent | 356823d270a33b65ef4a34133f5d65100b5f59e4 (diff) | |
download | freeipa-55f89dc68940e3a4376fb80e97dbd0f2773c6ed1.tar.gz freeipa-55f89dc68940e3a4376fb80e97dbd0f2773c6ed1.tar.xz freeipa-55f89dc68940e3a4376fb80e97dbd0f2773c6ed1.zip |
Do kinit in client before connecting to backend
The client installer was failing because a backend connection could be
created before a kinit was done.
Allow multiple simultaneous connections. This could fail with an NSS
shutdown error when the second connection was created (objects still
in use). If all connections currently use the same database then there
is no need to initialize, let it be skipped.
Add additional logging to client installer.
https://fedorahosted.org/freeipa/ticket/2478
Diffstat (limited to 'ipa-client')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 99b5137f9..22c6a9256 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -179,6 +179,7 @@ def nssldap_exists(): def emit_quiet(quiet, message): if not quiet: print message + root_logger.debug(message) def uninstall(options, env, quiet=False): @@ -1033,6 +1034,7 @@ def update_ssh_keys(server, hostname, ssh_dir, create_sshfp): except StandardError, e: root_logger.warning("host_mod: %s" % str(e)) print >>sys.stderr, "Failed to upload host SSH public keys." + root_logger.debug('Failed to upload host SSH public keys.') return if create_sshfp: @@ -1326,7 +1328,6 @@ def install(options, env, fstore, statestore): if 'config_loaded' not in api.env: print >>sys.stderr, "Failed to initialize IPA API." return CLIENT_INSTALL_ERROR - api.Backend.xmlclient.connect() # Always back up sssd.conf. It gets updated by authconfig --enablekrb5. fstore.backup_file("/etc/sssd/sssd.conf") @@ -1350,6 +1351,7 @@ def install(options, env, fstore, statestore): os.environ['KRB5CCNAME'] = CCACHE_FILE try: ipautil.run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab', 'host/%s' % hostname]) + api.Backend.xmlclient.connect() except CalledProcessError, e: print >>sys.stderr, "Failed to obtain host TGT." @@ -1480,6 +1482,7 @@ def install(options, env, fstore, statestore): configure_ssh(fstore, ipaservices.knownservices.sshd.get_config_dir(), options) print "Client configuration complete." + root_logger.debug('Client configuration complete.') return 0 |