On 10/02/16 15:20 +0100, Stanislav Kopp wrote: > I have general, clarification question about how fence agents work > with pacemaker (crmsh in particular). As far I understood STDIN > arguments can be used within pacemaker resources and command line > arguments in terminal (for testing and scripting?).
Fencing scripts from fence-agents package support both kinds of input; Pacemaker will pass the arguments (de facto attributes/parameters of the particular stonith resource as specified in CIB via tools like crmsh + some fence-agents API specific parameters like "action", but user-provided values always take precedence when configured) by piping them into the running script, but there is no reason you could not do the same from terminal, e.g.: # /usr/sbin/fence_pve <<EOF action=reboot ipaddr=... [...] EOF (note the verbatim newlines) > I have "fence_pve" [1] agent which works fine with command line > arguments, but not with pacemaker, it says some parameters like > "passwd" or "login" does not exist, Can you fully specify "it" in the previous sentence, please? Or even better, can you mimic what Pacemaker pumps into the agent per the example above? There may be a bug in interaction between fence_pve implementation and the fencing library, which does the heavy lifting behind the scenes. > although STDIN parameters are supported [2] > > [1] > https://github.com/ClusterLabs/fence-agents/blob/master/fence/agents/pve/fence_pve.py > [2] https://www.mankier.com/8/fence_pve#Stdin_Parameters -- Jan (Poki)
pgpS3cj3_7KA7.pgp
Description: PGP signature
_______________________________________________ Users mailing list: [email protected] http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
