Bug 1937025
| Summary: | Support version 1.1 of the OCF Resource Agent API standard | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Ken Gaillot <kgaillot> |
| Component: | resource-agents | Assignee: | Oyvind Albrigtsen <oalbrigt> |
| Status: | CLOSED WONTFIX | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.5 | CC: | agk, cluster-maint, fdinitto |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-09-09 07:27:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ken Gaillot
2021-03-09 17:23:47 UTC
How role name changes may affect resource agents:
* Pacemaker now provides resource agents with new environment variables (in addition to the existing ones) for promotable clone notifications, with "master" replaced with "promoted" and "slave" replaced with "unpromoted", for example OCF_RESKEY_CRM_meta_notify_unpromoted_resource will be identical to OCF_RESKEY_CRM_meta_notify_slave_resource. Probably the most compatible way of doing it would be to put something like
: ${OCF_RESKEY_CRM_meta_notify_unpromoted_resource:=OCF_RESKEY_CRM_meta_notify_slave_resource}
in one of the ocf-* includes for each affected variable, and then use the new names in agents.
* The crm_master command has been deprecated (in help only) and replaced with a new crm_attribute --promotion option that defaults to --lifetime=reboot (example: "crm_master -l reboot -v 10" becomes "crm_attribute --promotion -v 10"). The old command will still work for now, but the new one should be used if available. Maybe ocf-shellfuncs could provide a wrapper for setting promotion scores.
* ocf-returncodes needs new values for the now-standard OCF 1.1 exit statuses, and agents should use the new names rather than OCF_{RUNNING,FAILED}_MASTER:
OCF_RUNNING_PROMOTED=8
OCF_FAILED_PROMOTED=9
OCF_DEGRADED_SUCCESS=190
OCF_DEGRADED_PROMOTED=191
* Agents should support OCF 1.0 in RHEL 8, and OCF 1.1 in RHEL 9. This means some values will need to be replaceable (maybe switched by a ./configure option). The main difference will be in meta-data: advertising "<version>1.0</version>" or "<version>1.1</version>", and for promotable agents, advertising "role=" in <action> as either Master and Slave or Promoted and Unpromoted.
* Ideally any use of the old terms in code/comments/help/etc. should be updated.
(In reply to Ken Gaillot from comment #1) > How role name changes may affect resource agents: > > * Pacemaker now provides resource agents with new environment variables (in > addition to the existing ones) for promotable clone notifications, with > "master" replaced with "promoted" and "slave" replaced with "unpromoted", > for example OCF_RESKEY_CRM_meta_notify_unpromoted_resource will be identical > to OCF_RESKEY_CRM_meta_notify_slave_resource. Probably the most compatible > way of doing it would be to put something like > > : > ${OCF_RESKEY_CRM_meta_notify_unpromoted_resource: > =OCF_RESKEY_CRM_meta_notify_slave_resource} > > in one of the ocf-* includes for each affected variable, and then use the > new names in agents. > > * The crm_master command has been deprecated (in help only) and replaced > with a new crm_attribute --promotion option that defaults to > --lifetime=reboot (example: "crm_master -l reboot -v 10" becomes > "crm_attribute --promotion -v 10"). The old command will still work for now, > but the new one should be used if available. Maybe ocf-shellfuncs could > provide a wrapper for setting promotion scores. > > * ocf-returncodes needs new values for the now-standard OCF 1.1 exit > statuses, and agents should use the new names rather than > OCF_{RUNNING,FAILED}_MASTER: > > OCF_RUNNING_PROMOTED=8 > OCF_FAILED_PROMOTED=9 > OCF_DEGRADED_SUCCESS=190 > OCF_DEGRADED_PROMOTED=191 > > * Agents should support OCF 1.0 in RHEL 8, and OCF 1.1 in RHEL 9. This means > some values will need to be replaceable (maybe switched by a ./configure > option). The main difference will be in meta-data: advertising > "<version>1.0</version>" or "<version>1.1</version>", and for promotable > agents, advertising "role=" in <action> as either Master and Slave or > Promoted and Unpromoted. > > * Ideally any use of the old terms in code/comments/help/etc. should be > updated. * Some resource agents (e.g. redis) check the output of "crm_resource --locate" or "crm_mon --as-xml" for "Master". For maximum compatibility, they should search for "Master" or "Promoted", though it would also be fine to check the Pacemaker CRM feature set and look for "Master" if less than 3.9.0 and "Promoted" otherwise. FYI, an upstream wiki page has been created for how to update an agent from OCF 1.0 to 1.1:
https://wiki.clusterlabs.org/wiki/Update_Resource_Agent_for_OCF_1.1
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. |