CA-260364: Pool join in XenCenter: Use homogeneity flag from other_config for Ely/Honolulu hosts (#1710)

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-07-24 15:05:14 +01:00 committed by Stephen Turner
parent 2fb35c8faa
commit b783bff444
2 changed files with 15 additions and 2 deletions

View File

@ -409,8 +409,8 @@ namespace XenAdmin.Core
if (!Helpers.ElyOrGreater(slave) || !Helpers.ElyOrGreater(master)) if (!Helpers.ElyOrGreater(slave) || !Helpers.ElyOrGreater(master))
return false; return false;
var masterUpdates = master.AppliedUpdates().Where(update => update.enforce_homogeneity).Select(update => update.uuid).ToList(); var masterUpdates = master.AppliedUpdates().Where(update => update.EnforceHomogeneity).Select(update => update.uuid).ToList();
var slaveUpdates = slave.AppliedUpdates().Where(update => update.enforce_homogeneity).Select(update => update.uuid).ToList(); var slaveUpdates = slave.AppliedUpdates().Where(update => update.EnforceHomogeneity).Select(update => update.uuid).ToList();
return masterUpdates.Count != slaveUpdates.Count || !masterUpdates.All(slaveUpdates.Contains); return masterUpdates.Count != slaveUpdates.Count || !masterUpdates.All(slaveUpdates.Contains);
} }

View File

@ -74,5 +74,18 @@ namespace XenAPI
this.Connection.Cache.Hosts.Where(h => this.AppliedOn(h)).ToList(); this.Connection.Cache.Hosts.Where(h => this.AppliedOn(h)).ToList();
} }
} }
private string enforce_homogeneity_key = "enforce_homogeneity";
public bool EnforceHomogeneity
{
get
{
if (Helpers.InvernessOrGreater(Connection))
return enforce_homogeneity;
var poolPatchOfUpdate = Connection.Cache.Pool_patches.FirstOrDefault(p => p.pool_update != null && p.pool_update.opaque_ref == opaque_ref);
return poolPatchOfUpdate != null && BoolKey(poolPatchOfUpdate.other_config, enforce_homogeneity_key);
}
}
} }
} }