Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop ignoring order of primitives in colocation constraints
cs_colocation, when used with the pcs provider, makes the incorrect assumption that the order of primitives in colocation constraints is arbitrary. It is not, and the following must not be equivalent: cs_colocation { 'vip_with_service': primitives => [ 'nginx_vip', 'nginx_service' ], } cs_colocation { 'vip_with_service': primitives => [ 'nginx_service', 'nginx_vip' ], } These mean different things. The first example ensures that nginx_vip runs on whatever node nginx_service runs on, and if nginx_service can't be started on any node, Pacemaker won't even attempt to start nginx_vip. However, if nginx_vip cannot be started on any node, nginx_service will continue to be available. The second example means the opposite. In it, nginx_service is configured to run wherever nginx_vip runs, and if nginx_vip can't run anywhere, nginx_service won't start. And if nginx_vip cannot be started on any node, nginx_service will not be available. As a result, drop artificial sorting for the primitives, and use them exactly as specified. Fixes issue voxpupuli#150.
- Loading branch information
If this is meant to be in line with the
crm
provider and the definition given in the type, by the way, then the order of this needs to be swapped. The type seems to want to redefine the order in which primitives are specified.