diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-02-03 17:20:26 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-02-14 15:03:32 -0500 |
commit | 309ed42865715dbc652f1946320ecb522267e97c (patch) | |
tree | a0ab23d29a1f068058fb3a7452af642eca3fcafb /ipa-client | |
parent | 04597f4e363c148d826fdb6338f7aa287cdd90ec (diff) | |
download | freeipa-309ed42865715dbc652f1946320ecb522267e97c.tar.gz freeipa-309ed42865715dbc652f1946320ecb522267e97c.tar.xz freeipa-309ed42865715dbc652f1946320ecb522267e97c.zip |
Detection of v1 server during ipa-client-install
When v2 IPA client is trying to join an IPA v1 server
a strange exception is printed out to the user. This patch
detects this by catching an XML-RPC error reported by ipa-join
binary called in the process which fails on unexisting IPA server
'join' method.
https://fedorahosted.org/freeipa/ticket/553
Diffstat (limited to 'ipa-client')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 32a9aef17..d69a10383 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -684,7 +684,11 @@ def main(): (stdout, stderr, returncode) = run(join_args, raiseonerr=False, env=env) if returncode != 0: - print >>sys.stderr, "Joining realm failed: %s" % stderr, + if returncode == 17: # XML-RPC fault - possible IPA v1/v2 incompatibility + print "Joining realm failed because of failing XML-RPC request." + print " This error may be caused by incompatible server/client major versions." + else: + print >>sys.stderr, "Joining realm failed: %s" % stderr, if not options.force: return 1 print " Use ipa-getkeytab to obtain a host principal for this server." |