Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OCF 1.1 reload-agent action #2349

Merged
merged 23 commits into from Apr 22, 2021
Merged

Conversation

kgaillot
Copy link
Contributor

Pacemaker previously used the "reload" action to reload agent parameters, but most agents used it to reload the service configuration. Pacemaker also misused the OCF 1.0 "unique" parameter attribute to indicate reloadability.

OCF 1.1 created the "reload-agent" action and "reloadable" parameter attribute for the Pacemaker usage.

Pacemaker now supports the OCF 1.1 usage. The old usage is now deprecated, but will be supported if the agent does not claim OCF 1.1 or later compliance and does not advertise the reload-agent action.

Special care must be taken so that rolling upgrades work (i.e. an older DC will still schedule reload commands), and that the controller chooses reload or reload-agent based on what the resource meta-data advertises, regardless of what command the DC schedules. (Technically that means we didn't have to change what the DC schedules, but I think having it schedule reload-agent will be less confusing.)

@kgaillot
Copy link
Contributor Author

@wenningerk , can you review this when you get a chance? Thanks

@wenningerk
Copy link
Contributor

lgtm

With the release of the OCF 1.1 standard, this information may come in handy
during troubleshooting.

We warn if the RA does not advertise an OCF version, or if it advertises a
major version higher than what Pacemaker supports, and otherwise log a debug
message with the supported version.
... for new OCF 1.1 "reload-agent" action
This will make it easier to add new criteria.
... for better code isolation and future reuse
Pacemaker previously used the "reload" action to reload agent parameters, but
most agents used it to reload the service configuration. Pacemaker also misused
the OCF 1.0 "unique" parameter attribute to indicate reloadability.

OCF 1.1 created the "reload-agent" action and "reloadable" parameter attribute
for the Pacemaker usage.

Pacemaker now supports the OCF 1.1 usage. The old usage is now deprecated, but
will be supported if the agent does not claim OCF 1.1 or later compliance and
does not advertise the reload-agent action.
... unless Pacemaker was built using --enable-compat-2.0, in which case it's
really 1.0 with extensions.
In a rolling upgrade, the DC can't schedule reload-agent actions until all
nodes have been upgraded.
... to make future changes less error-prone
@kgaillot
Copy link
Contributor Author

kgaillot commented Apr 20, 2021

Rebased on current master and added 5 commits on top to address review

@kgaillot
Copy link
Contributor Author

After further testing, I added 2 more commits on top -- one to fix a regression since 1.1.18 (!) and one to always advertise OCF 1.1 support to agents (since we do support 1.1 agents regardless of compatibility settings).

@wenningerk , can you review the top 7 commits? Thanks ...

@wenningerk
Copy link
Contributor

@wenningerk , can you review the top 7 commits? Thanks ...

The top 4 - looked at just that far are fine for me.
Maybe be could use inotify on platforms that support it to monitor the agent-scripts - or add an external interface where a platform specific script (simple inotifywait-loop in the standard linux case) can take care of the platform specific handling.
I was already hesitant regarding the 1.1 advertisement and wanted to discuss it - but as you see it the same ...

c820651 (in 1.1.18) introduced a regression where cached meta-data was allowed
to be used after a start action. Meta-data should always be refreshed from the
agent after a start, in case the resource agent was updated.
Upon further consideration, Pacemaker should advertise OCF 1.1 support to
agents even when built with --enable-compat-2.0, because Pacemaker supports the
OCF 1.1 role names and reload-agent action in the agent either way, even if
it's not using the new role names in log messages and output itself.
@kgaillot
Copy link
Contributor Author

OK, I still have a little testing to do, but hopefully this is the final form. The last 4 commits are different from last time.

@wenningerk
Copy link
Contributor

OK, I still have a little testing to do, but hopefully this is the final form. The last 4 commits are different from last time.

changes looking good to me

@kgaillot kgaillot merged commit d469c63 into ClusterLabs:master Apr 22, 2021
@kgaillot kgaillot deleted the ocf11 branch April 22, 2021 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants