Anti-affinity for OSE nodes
Hi,
I did not find any affinity rules for the OSE nodes in order to avoid for instance two PODs that must run on two different OSE nodes run on the same host. Perhaps, two different OSE nodes should not run on the same compute node?
Best Regards,
We don't enforce (anti-)affinity for openshift nodes, only for master nodes - https://github.com/redhat-openstack/openshift-on-openstack/blob/master/openshift.yaml#L83 . We could add similar server group/policy for openshift_nodes too (but by default this policy should not be enforced).
I do not understand why you would not enforce this policy, simply because, without it, we cannot rely anymore on the POD affinity policy (as nothing ensure that two PODs with anti affinity policy will not run on the same physical host ; and I think this is the real expectation of putting such affinity rules).
The problem with anti-affinity rule is that if there are not enough compute nodes, whole deployment fails (IOW you can't scale up beyond compute node count), this is quite restrictive especially in situations where you have few nodes only, or in situations when you need to replace some nodes (because of maintenance) and migrate instances to another node. AFAIK anti-affinity is also not enforced on other cloud providers (for openshift deployment). So not enforcing policy seems like a better default value for now (we are talking about default value, nothing would block you to enable it).
Update: actually it seems that soft-anti-affinity policy has been already implemented - I think this is ideal default - if possible, use different host, but don't fail if no different host is available. Once this feature is available in Centos/RHEL, we can switch to this default. Makes sense?
Hi Jan,
- Simple answer: as long as there is the possibility to enforce hard anti-affinity rule I think the job is done.
- Complex answer: IMHO I prefer a deployment that fails because I do not have enough compute nodes than having a deployment working by hiding such important fact to me… and let me believe when I order to not host ≠ pods on the same host it will be the case (and it will not :-()
Thanks for your work btw ;-) Best Regards,
Hi @romainsc @jprovaznik !
I added a servergroup for nodes, defaulting to 'soft-anti-affinity'. If it's fine for you I'll push the patch.
Thx++Peace, R.
@markllama Once https://bugzilla.redhat.com/show_bug.cgi?id=1480338 is fixed and soft-anti-affinity made it into OCP10 we could update the heat templates and create a node ServerGroup with soft-anti-affinity