[ClusterLabs] Stonith level add target specification
Tomas Jelinek
tojeline at redhat.com
Wed Jan 7 14:30:51 UTC 2026
Hi Olaf,
Dne 05. 01. 26 v 20:20 Faaland, Olaf P. via Users napsal(a):
>
> Hi,
>
> I’m starting to use stonith levels.
>
> My existing (1-level stonith config) looks like this:
>
> #pcs stonith config
>
> Resource: fence_pm (class=stonith type=fence_powerman)
>
> Attributes: fence_pm-instance_attributes
>
> ipaddr=localhost
>
> ipport=10101
>
> pcmk_delay_base=60s
>
> pcmk_delay_max=90s
>
> pcmk_host_check=static-list
>
> pcmk_host_list=gopher1,gopher2,gopher3,gopher4,gopher5,gopher6,gopher7,gopher8,gopher9,gopher10
>
> Operations:
>
> monitor: fence_pm-monitor-interval-60s
>
> interval=60s
>
> And I want to switch to a 2-level stonith config. I’d expected these
> commands to work:
>
> lustre_servers=gopher1,gopher2,gopher3,gopher4,gopher5,gopher6,gopher7,gopher8,gopher9,gopher10
>
> # set up new fence agent
>
> pcs stonith create fence_kdump fence_kdump pcmk_host_check=static-list
> pcmk_host_list=${lustre_servers}
>
> # set levels (priority) so pacemaker knows which to use first
>
> pcs stonith level add 1${lustre_servers}fence_kdump
>
> pcs stonith level add 2${lustre_servers}fence_pm
>
> # verify config
>
> pcs stonith level verify
>
> The “pcs stonith create” succeeds, but the “pcs stonith level add”
> fails. Looking at the man page, it looks like a comma-separated
> target list isn’t allowed for “pcs stonith level add”. Is that correct?
>
It would be helpful to see the error messages pcs printed.
Anyway, the target is supposed to be a single value, e.g. a node name,
as the man page describes. I don't think a list has ever been allowed there.
Since your fence_kdump and fence_pm handle all cluster nodes, you can
use them for all your nodes. Meaning you need to run those two commands
for every node, unless you decide to specify nodes using regular
expressions or node attributes.
> In the man page, I see
>
> Target may be a node name <node_name> or %<node_name> or
>
> node%<node_name>, a node name regular expression
> regexp%<node_pattern>
>
> or a node attribute value attrib%<name>=<value>.
>
> Is “%” literal, here?
>
yes
>
> Do
>
> “pcs stonith level add <level> node%<node_name> <stonith_id>” and
>
> “pcs stonith level add <level> %<node_name> <stonith_id>” and
>
> “pcs stonith level add <level> <node_name> <stonith_id>” mean
> something different? They seem identical from brief experiments.
>
They are the same. If type (the part in front of %) is not specified, it
defaults to 'node'.
>
> How is “attrib%<name>=<value>” used?
>
This makes the level apply to nodes with the specified attribute name
and value. It is documented at
https://clusterlabs.org/projects/pacemaker/doc/3.0/Pacemaker_Explained/html/fencing.html#fencing-topologies
. Node attributes are managed using 'pcs node attribute' command.
Regards,
Tomas
> Thanks,
>
> Olaf
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home:https://www.clusterlabs.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20260107/ac834ac9/attachment.htm>
More information about the Users
mailing list