Merge pull request #885 from stephen-turner/CA-202427

CA-202427: XenCenter throws an exception when trying to create a new …
This commit is contained in:
Mihaela Stoica 2016-03-07 14:57:13 +00:00
commit 13b6182e13

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;