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
>From 0f388aedb7679f8c81e9a8592627936180e4108a Mon Sep 17 00:00:00 2001 From: Martin Kosek <[email protected]> Date: Mon, 19 Sep 2011 18:37:27 +0200 Subject: [PATCH] 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 --- ipalib/rpc.py | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/ipalib/rpc.py b/ipalib/rpc.py index d667df71ed451f9263153ef6fcf71fc85633dabc..5491b28da87629f9572a5775cef5c0325511ab86 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): -- 1.7.6
_______________________________________________ Freeipa-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/freeipa-devel
