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:08:32 +0200
commitffd760c1002cfe6b27d140affa8e0608696d3668 (patch)
tree7e00c2f04ac381236732ae051108bce7e705fecf /ipalib
parent9ccd979f02b85e4d7cdccdf3502fead94643a08d (diff)
downloadfreeipa-ffd760c1002cfe6b27d140affa8e0608696d3668.tar.gz
freeipa-ffd760c1002cfe6b27d140affa8e0608696d3668.tar.xz
freeipa-ffd760c1002cfe6b27d140affa8e0608696d3668.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):