summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-10-04 00:44:51 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-10-04 15:33:58 +0200
commit5824a0e14e73f8d13a93ccccf1b5213488ff9eaa (patch)
tree36215df8044a70eefa354537ea070a563d6c79d7 /ipa-client
parente01a28b584b8721d12a0b65fe4fdac507327f7da (diff)
downloadfreeipa-5824a0e14e73f8d13a93ccccf1b5213488ff9eaa.tar.gz
freeipa-5824a0e14e73f8d13a93ccccf1b5213488ff9eaa.tar.xz
freeipa-5824a0e14e73f8d13a93ccccf1b5213488ff9eaa.zip
ipa-client-install: Verify RPC connection with a ping
With old servers, it is possible that xmlclient.connect() succeeds but commands fail with a Kerberos error. Verify that commands succeed by sending a ping after connecting. Follow-up to: https://fedorahosted.org/freeipa/ticket/3931
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index e23e6dc58..3c78c844b 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -2350,13 +2350,22 @@ def install(options, env, fstore, statestore):
pass
# Now, let's try to connect to the server's XML-RPC interface
+ connected = False
try:
api.Backend.xmlclient.connect()
+ connected = True
+ root_logger.debug('Try RPC connection')
+ api.Backend.xmlclient.forward('ping')
except errors.KerberosError, e:
+ if connected:
+ api.Backend.xmlclient.disconnect()
root_logger.info('Cannot connect to the server due to ' +
'Kerberos error: %s. Trying with delegate=True', str(e))
try:
api.Backend.xmlclient.connect(delegate=True)
+ root_logger.debug('Try RPC connection')
+ api.Backend.xmlclient.forward('ping')
+
root_logger.info('Connection with delegate=True successful')
# The remote server is not capable of Kerberos S4U2Proxy delegation