summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-09-19 18:37:27 +0200
committerMartin Kosek <mkosek@redhat.com>2011-09-22 15:09:48 +0200
commit798490ffb6b83bf9cf1a5bdbddefca441b9421f9 (patch)
treec65995cf363e679697fe8b0cef9869d26947a0dc /ipalib
parent89e8e1a3d6d4b898958c911d12bea99f73d8a716 (diff)
downloadfreeipa-798490ffb6b83bf9cf1a5bdbddefca441b9421f9.tar.gz
freeipa-798490ffb6b83bf9cf1a5bdbddefca441b9421f9.tar.xz
freeipa-798490ffb6b83bf9cf1a5bdbddefca441b9421f9.zip
Fix /usr/bin/ipa dupled server list
Fix get_url_list() so that the configured master server is there just once. This fix lets /usr/bin/ipa try connecting to all IPA masters just once and not print confusing server list with dupled master. https://fedorahosted.org/freeipa/ticket/1817
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/rpc.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index d667df71e..5491b28da 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -325,7 +325,15 @@ class xmlclient(Connectible):
servers = list(set(servers))
# the list/set conversion won't preserve order so stick in the
# local config file version here.
- servers.insert(0, self.env.xmlrpc_uri)
+ cfg_server = self.env.xmlrpc_uri
+ if cfg_server in servers:
+ # make sure the configured master server is there just once and
+ # it is the first one
+ servers.remove(cfg_server)
+ servers.insert(0, cfg_server)
+ else:
+ servers.insert(0, cfg_server)
+
return servers
def create_connection(self, ccache=None, verbose=False, fallback=True):