Use temporary key cache for host key in server installation

This fixes an oversight in the earlier patch
This commit is contained in:
Petr Viktorin 2012-09-12 10:30:31 -04:00 committed by Martin Kosek
parent 79b90d1465
commit 2225730e99

View File

@ -1572,9 +1572,10 @@ def install(options, env, fstore, statestore):
if options.on_master: if options.on_master:
# If on master assume kerberos is already configured properly. # If on master assume kerberos is already configured properly.
# Get the host TGT. # Get the host TGT.
os.environ['KRB5CCNAME'] = CCACHE_FILE
try: try:
run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab', run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab',
'host/%s@%s' % (hostname, cli_realm)], env=env) 'host/%s@%s' % (hostname, cli_realm)])
except CalledProcessError, e: except CalledProcessError, e:
root_logger.error("Failed to obtain host TGT.") root_logger.error("Failed to obtain host TGT.")
return CLIENT_INSTALL_ERROR return CLIENT_INSTALL_ERROR