From c1f1cbb26a185e22c5a8d9c8811d57add60eeb80 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 14 Oct 2008 14:42:23 +0000 Subject: [PATCH] Fix ordering of instance/nodes After the locking changes, and the partial locking of nodes, the instance/node list is not ordered anymore. Reorder so that it behaves as before. Reviewed-by: ultrotter --- lib/cmdlib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 1eaed4c1a..8b31fd6c4 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -1476,6 +1476,8 @@ class LUQueryNodes(NoHooksLU): "Some nodes were removed before retrieving their data: %s" % missing) else: nodenames = all_info.keys() + + nodenames = utils.NiceSort(nodenames) nodelist = [all_info[name] for name in nodenames] # begin data gathering @@ -2664,6 +2666,8 @@ class LUQueryInstances(NoHooksLU): % missing) else: instance_names = all_info.keys() + + instance_names = utils.NiceSort(instance_names) instance_list = [all_info[iname] for iname in instance_names] # begin data gathering -- GitLab