RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1937025 - Support version 1.1 of the OCF Resource Agent API standard
Summary: Support version 1.1 of the OCF Resource Agent API standard
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: resource-agents
Version: 8.5
Hardware: All
OS: All
unspecified
high
Target Milestone: rc
: 8.5
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-09 17:23 UTC by Ken Gaillot
Modified: 2022-09-09 07:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-09 07:27:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Ken Gaillot 2021-03-09 17:23:47 UTC
This bug was initially created as a copy of Bug #1936696


The upstream ClusterLabs community is preparing to release version 1.1 of the OCF Resource Agent API standard, which will include a number of new features and clarifications compared to the previous version.

The RHEL High-Availability components will need to support this for RHEL 9.0, and a subset of support could be added as of 8.5 (any of the things mentioned as optional below).

Some key aspects that might require changes (agents refers to all OCF agents whether supplied by resource-agents, pacemaker, or some other package) are listed below. Some of these might warrant (or already have) their own BZs.

* The version number changes to 1.1
** In RHEL 9, agent meta-data should advertise 1.1 support. In RHEL 8, agents that use the old role names should continue to advertise 1.0 support, while agents that don't use role names could (but don't have to) advertise 1.1 support.
** pacemaker should set the OCF_RA_VERSION_MINOR environment variable to 1 instead of 0 in RHEL 9 and optionally 8

* The role names are now "promoted" and "unpromoted" instead of "Master" and "Slave".
** pacemaker should use the new names in help, logs, and output in 9 but not 8. In 9 and optionally 8, all names should be supported in user configurations; the crm_resource --master option should be renamed to --promoted, with the old option accepted for backward compatibility; the crm_master command should be renamed to pcmk_promotion, with the old name symlinked for backward compatibility; and relevant clone notification environment variables (OCF_RESKEY_CRM_meta_notify_master_resource etc.) should be provided with both the old and new names.
** Agents should use the new names in meta-data, help, etc., in 9 but not 8. Agents should use the new crm_resource --promoted option, crm_promotion command, and clone notification variables names in 9 and optionally 8 if supported by pacemaker. If agents parse pacemaker output for role names, they should look for either set of names in 9 and optionally 8.
** pcs should support all names in user input in 9 and optionally 8. The new names should be used in help and output in 9 but not 8. Any commands, options, etc., named after the old names should be renamed to the new ones with the old ones accepted for backward compatibility, in 9 and optionally 8.
** Note: promotion score node attribute names (master-*) are not part of the standard and are not changing at this time. However, anything outside pacemaker should use the crm_master or crm_promotion command instead of dealing with these attributes directly.

* The "unique" agent meta-data field has been deprecated in favor of two new fields, "unique-group" and "reloadable". Agents that support "reloadable" should support the new "reload-params" action.
** Pacemaker should support reloadable if present, otherwise unique if present, and support the reload-params action if present, otherwise reload if present, in 9 and optionally 8.
** Agents should provide both the old and new meta-data names, and the reload-params action if appropriate, in 9 and optionally 8.

* A number of new agent meta-data fields ("required", "deprecated", etc.) give additional hints for user interfaces.
** Agents should provide these in 9 and optionally 8.
** pcs can support these as desired.

* The new OCF_OUTPUT_FORMAT environment variable may be supported to indicate that the agent should output text or XML.
** Pacemaker's crm_resource and stonith_admin commands could set this appropriate to user-specified options before calling agents (at least for validate-all, which is the target use case).
** Agents may support this as desired.

* The OCF_CHECK_LEVEL environment variable may be supported for the validate-all action, to select host-independent or host-specific validation.
** Agents may support this as desired.
** Pacemaker could add an option to crm_resource and stonith_admin for check level when performing validation or monitoring.
** pcs could use the new pacemaker tool options if supported.

* Agent exit statuses have been clarified and expanded.
** Agents may support the new usage as desired. (Pacemaker already does.)

I may have missed some other places changes are needed, but those should be the most important.

Once adopted, the standard will be available at https://github.com/ClusterLabs/OCF-spec/tree/master/ra/1.1

This has been filed against 8.5 in case a subset will be implemented there, but may be cloned for or reassigned to 9.0, and some items could get their own bzs if separate tracking is desired

Comment 1 Ken Gaillot 2021-04-08 23:19:27 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.

Comment 2 Ken Gaillot 2021-04-09 16:47:25 UTC
(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.

Comment 3 Ken Gaillot 2021-04-13 17:01:05 UTC
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

Comment 5 RHEL Program Management 2022-09-09 07:27:35 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.