Currently, the node listing RPC is very slow due to missing parallelisation. For the 2.7 release, we reset these back to masterd, hoping to revert them by the time 2.8 is ready.
There are a number of queries that I've left pointing to confd, as they are non-RPC: - node fields query - node static fields query (and added a note in one case where it could become a problem) All the other converted queries (job listing, group queries, tags, cluster config) remain pointing to confd, as they don't use RPC. Signed-off-by: Iustin Pop <[email protected]> --- lib/client/gnt_node.py | 6 ++++-- lib/rapi/rlib2.py | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index e893b5e..e15a6d8 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -303,7 +303,7 @@ def ListNodes(opts, args): fmtoverride = dict.fromkeys(["pinst_list", "sinst_list", "tags"], (",".join, False)) - cl = GetClient(query=True) + cl = GetClient(query=False) return GenericList(constants.QR_NODE, selected_fields, args, opts.units, opts.separator, not opts.no_headers, @@ -529,6 +529,8 @@ def ShowNodeConfig(opts, args): @return: the desired exit code """ + # note: if this starts using RPC fields, and we haven't yet fixed + # hconfd, then we should revert to query=False cl = GetClient(query=True) result = cl.QueryNodes(fields=["name", "pip", "sip", "pinst_list", "sinst_list", diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index bfd5415..d748913 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -397,7 +397,7 @@ class R_2_nodes(baserlib.OpcodeResource): """Returns a list of all nodes. """ - client = self.GetClient(query=True) + client = self.GetClient(query=False) if self.useBulk(): bulkdata = client.QueryNodes([], N_FIELDS, False) @@ -420,7 +420,7 @@ class R_2_nodes_name(baserlib.OpcodeResource): """ node_name = self.items[0] - client = self.GetClient(query=True) + client = self.GetClient(query=False) result = baserlib.HandleItemQueryErrors(client.QueryNodes, names=[node_name], fields=N_FIELDS, -- 1.8.1
