CA-202427: XenCenter throws an exception when trying to create a new pool

This commit is contained in:
Stephen Turner 2016-03-07 14:54:06 +00:00
parent 4f2260bf15
commit 3e1658d817

View File

@ -263,7 +263,8 @@ namespace XenAdmin.Core
// the CPUs can be pooled but only if they are masked first.
public static bool CompatibleCPUs(Host slave, Host master, bool allowCpuLevelling)
{
if (slave == null || master == null)
// As of Dundee, feature levelling makes all CPUs compatible
if (slave == null || master == null || Helpers.DundeeOrGreater(master) || Helpers.DundeeOrGreater(slave))
return true;
Dictionary<string, string> slave_cpu_info = slave.cpu_info;
@ -276,10 +277,6 @@ namespace XenAdmin.Core
if (slave_cpu_info["vendor"] != master_cpu_info["vendor"])
return false;
// No feature checks are needed for Dundee or greater hosts
if (Helpers.DundeeOrGreater(master))
return true;
if (slave_cpu_info["features"] == master_cpu_info["features"])
return true;