mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
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:
parent
2fb35c8faa
commit
b783bff444
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user