Bug 1943476
| Summary: | [RFE] Colocation without placement order dependency | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Reid Wahl <nwahl> |
| Component: | pacemaker | Assignee: | Ken Gaillot <kgaillot> |
| Status: | NEW --- | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8.3 | CC: | cluster-maint |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Feature Request | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Reid Wahl
2021-03-26 07:10:21 UTC
(In reply to Reid Wahl from comment #0) > Description of problem: > > It would at times be extremely convenient to be able to direct Pacemaker > that either: > (a) "This set of resources should all run on the same node" or more > precisely, "For every resource in this set, all resources that are scheduled > to run should run on the same node." Or: > (b) "No two resources within this set should run on the same node." These are essentially upstream bzs 5052 and 5320. The implementation of (a) would basically be your workaround implemented internally. A dummy resource would be created implicitly to colocate the others with. The resource_set require-all option (currently only meaningful for orderings) could be reused for this purpose. The upstream bz for (b) gives a workaround, using utilization values to ensure no one node can run more than one of the resources (pcs does support utilization values). For syntax, we might be able to use the desired behavior anytime score="-INFINITY" on a colocated set. The implementation would be to modify how Pacemaker accounts for dependent resources' preferences. Basically in a colocation chain, C with B and B with A, A will take into account B's location preferences at an attentuated value, and then recursively take C's into account as well. However if it is C with B and B *not* with A, then A takes the *inverse* of B's preferences into account, and recursively the inverse of C's preferences. All well to this point. But if it is C *not* with B and B *not* with A, A will take B's inverse preferences and C's normal (inverse of inverse) preferences (aka the enemy of my enemy is my friend), which is not the intent here. Figuring out which preferences to consider normal, which to consider inverted, and which to ignore may be painful but doable. (In reply to Ken Gaillot from comment #2) > (In reply to Reid Wahl from comment #0) > > Description of problem: > > > > It would at times be extremely convenient to be able to direct Pacemaker > > that either: > > (a) "This set of resources should all run on the same node" or more > > precisely, "For every resource in this set, all resources that are scheduled > > to run should run on the same node." Or: > > (b) "No two resources within this set should run on the same node." > > These are essentially upstream bzs 5052 and 5320. > > The implementation of (a) would basically be your workaround implemented > internally. A dummy resource would be created implicitly to colocate the > others with. The resource_set require-all option (currently only meaningful > for orderings) could be reused for this purpose. That reuse sounds good, as long as it doesn't change the behavior of require-all when another set is colocated with this set (set A). No negative interactions are coming to mind for me. If some set B depends on set A, then all the resources in set A should run on the same node anyway. I think the only place it **might** change behavior is in certain scenarios where there are conflicting constraints. In those cases, a user needs to fix the constraints and shouldn't expect resources to be placed in a reliable way. > The upstream bz for (b) gives a workaround, using utilization values to > ensure no one node can run more than one of the resources (pcs does support > utilization values). That's fine in the more common case where there's only one anti-colocation set. If there are two or more anti-colocation sets, then I believe the utilization workaround falls apart. Pacemaker wouldn't be able to ensure that at most one resource from each set is contributing to the node's utilization. > For syntax, we might be able to use the desired > behavior anytime score="-INFINITY" on a colocated set. The implementation > would be to modify how Pacemaker accounts for dependent resources' > preferences. > > Basically in a colocation chain, C with B and B with A, A will take into > account B's location preferences at an attentuated value, and then > recursively take C's into account as well. However if it is C with B and B > *not* with A, then A takes the *inverse* of B's preferences into account, > and recursively the inverse of C's preferences. All well to this point. But > if it is C *not* with B and B *not* with A, A will take B's inverse > preferences and C's normal (inverse of inverse) preferences (aka the enemy > of my enemy is my friend), which is not the intent here. > > Figuring out which > preferences to consider normal, which to consider inverted, and which to > ignore may be painful but doable. And whether to allow a user to configure the now-current (at that point legacy) behavior. I don't know if there's any reason a user might prefer or rely on the current behavior. I suspect most users are either indifferent or want the new proposed behavior. Maybe there could be a "chain" mode and a "set" mode. It's unlikely we'd want to use those exact terms in the syntax, but they convey my point. - The chain mode would maintain the current behavior or something similar to it. Each resource directly influences the next resource in the chain. - The set mode would be a sort of inverse of the "dummy colocator" model -- i.e., the scenario (b) in this RFE: "No two resources in this set can run on the same node." (In reply to Reid Wahl from comment #3) > Maybe there could be a "chain" mode and a "set" mode. It's unlikely we'd > want to use those exact terms in the syntax, but they convey my point. > - The chain mode would maintain the current behavior or something similar > to it. Each resource directly influences the next resource in the chain. > - The set mode would be a sort of inverse of the "dummy colocator" model > -- i.e., the scenario (b) in this RFE: "No two resources in this set can run > on the same node." In the set mode, if there aren't enough nodes available to run all the anti-colocated resources (so that one or more resources must be stopped), we should ideally place any running resources first. For example, if resource A's node is shutting down, and resource C is running somewhere else, we place resource C before placing resource A. That way, we don't stop C in order to run A. |