[ClusterLabs Developers] Fencing
Digimer
lists at alteeve.ca
Fri Sep 11 16:28:48 UTC 2020
On 2020-09-11 3:02 a.m., Marius Wilhelm wrote:
> Hello,
>
> Since the fence_virtd didnt work Ive wrote an own script which does this
> job.
> Now I just want to write an agent which executes the script as soon as a
> Node goes to the offline state.
> Im pretty new to pacemaker so I probably just doing some stupid mistakes.
> Could you give me a simple and short tutorial for that?
>
> Best regards
> Marius Wilhelm
Hi Marius,
Have you tried fence_virsh or fence_xvm?
You shouldn't need to write a fence agent in practice. To answer your
question though, you need to write an agent that follows the FenceAgentAPI;
https://github.com/ClusterLabs/fence-agents/blob/master/doc/FenceAgentAPI.md
The main components are that command line switches (used when called
manually) need to have 'variable=value' equivalents that the agents
reads by STDIN as well (one pair per line). The agent can internally
work however you want, but communicates success/failure/status via
exit/return codes. It's generally pretty easy to write.
You can use any agent you want, so the packagers prefer agents be in
python, should you wish to have the agent later added to the
fence_agents packages.
digimer
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
More information about the Developers
mailing list