diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 1fbdc28835cb09b0dc30bbfce8e751a819f0d5f8..e04f46cc9593b558c5b4673b71c10cfffea46c92 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -5713,7 +5713,7 @@ class LUClusterQuery(NoHooksLU): "architecture": (platform.architecture()[0], platform.machine()), "name": cluster.cluster_name, "master": cluster.master_node, - "default_hypervisor": cluster.enabled_hypervisors[0], + "default_hypervisor": cluster.primary_hypervisor, "enabled_hypervisors": cluster.enabled_hypervisors, "hvparams": dict([(hypervisor_name, cluster.hvparams[hypervisor_name]) for hypervisor_name in cluster.enabled_hypervisors]), @@ -13668,7 +13668,7 @@ class IAllocator(object): elif self.mode == constants.IALLOCATOR_MODE_RELOC: hypervisor_name = cfg.GetInstanceInfo(self.name).hypervisor else: - hypervisor_name = cluster_info.enabled_hypervisors[0] + hypervisor_name = cluster_info.primary_hypervisor node_data = self.rpc.call_node_info(node_list, [cfg.GetVGName()], [hypervisor_name])