Bug 1875632
Summary: | pcs resource enable/manage should override target-role=Stopped/is-managed=false in rsc_defaults | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Reid Wahl <nwahl> |
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> |
Status: | CLOSED WONTFIX | QA Contact: | cluster-qe <cluster-qe> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.2 | CC: | cfeist, cluster-maint, idevat, kgaillot, mlisik, mpospisi, omular, tojeline |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | 8.4 | ||
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: | 2022-03-03 07:27:22 UTC | Type: | Enhancement |
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
2020-09-03 23:24:03 UTC
(In reply to Reid Wahl from comment #0) > However, there are some special considerations where I'm not sure what > **should** happen. > ... > A related question is whether... We can also consider a conditional decision on when to set attributes explicitly and when to unset them, depending on something like a resource's location in the hierarchy (top-level or child) or whether the meta attribute is set explicitly at some point above the resource in the hierarchy. Every approach that I consider seems to lead to some type of counter-intuitive behavior or unexpected divergence from the current behavior. This will require some thought to make sure we don't surprise anyone too much. I'd love to hear other people's ideas, if you have them. It is tricky. Maybe additional warnings when settings conflict would help. Another confounding factor is that settings can be controlled by rules. So rsc1 might be disabled between midnight and 5 a.m., or only IPaddr2 resources might default to disabled, etc. One of my blue-sky to-do items is a new crm_rule option to evaluate the current value of any given attribute, considering all defaults, rules, etc. There's no BZ for that yet, but that might be the better approach, if we can also show where the value comes from. (Not that it would be easy.) pcs could keep its behavior mostly the same but always call that. I'm thinking something like: # crm_rule --evaluate --resource rsc1 --meta is-managed via default value: true # crm_rule --evaluate --resource rsc2 --meta is-managed via resource defaults: false # crm_rule --evaluate --resource rsc3 --meta is-managed via group meta-attribute: true # crm_rule --evaluate --resource group1 --meta target-role --output-as xml <pacemaker-result api-version="2.2" request="crm_rule --evaluate --resource group1 --meta target-role --output-as xml"> <meta-attribute resource="group1" name="target-role" value="Stopped" source="resource defaults"> <status code="0" message="OK"/> </pacemaker-result> # pcs resource enable group1 group1 is now disabled (by resource defaults) # pcs resource enable group1 --force group1 is now enabled (by group meta-attribute) The only pcs behavioral change would be using --force with enable/manage to set an explicit value. As Ken described, just figuring out why a resource is disabled / unmanaged is not trivial. Pacemaker also allows (and pcs will allow it as well, once bz1250744 is resolved) to set target-role and is-managed with rules. If meta attributes with rules are used, where should 'pcs resource enable' put the target-role=Started? Modifying the meta attributes with rules doesn't seem right as they are not in effect all the time. If pcs puts the target-role=Started to meta attributes with no rules, would that override meta-attributes with a rule? And if such override is permanent, we will need a way to revert to default. For this I like Ken's idea of 'pcs resource enable' just removing the target-role attribute reverting it to default and letting other parts of CIB to control it, while 'pcs resource enable --force' would set the target-role attribute to Started. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |