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

Add op monitor to primitives #431

Merged
merged 3 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion xml/article_pacemaker_remote.xml
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ ssh: connect to host &node4; port 3121: Connection refused</screen>
<procedure>
<step>
<para>Create a dummy resource:</para>
<screen>&prompt.root;<command>crm configure primitive fake1 ocf:pacemaker:Dummy</command></screen>
<screen>&prompt.root;<command>crm configure primitive fake1 ocf:pacemaker:Dummy \
op monitor timeout=20s interval=10s</command></screen>
</step>
<step>
<para>Check the cluster status with the <command>crm status</command> command.
Expand Down
3 changes: 2 additions & 1 deletion xml/geo_ip_i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
<command>ip="192.168.3.4" \</command><co xml:id="co-dyn-dns-ip"/>
<command>keyfile="<replaceable>/etc/whereever/Kgeo-update*</replaceable>.key" \</command><co xml:id="co-dyn-dns-key"/>
<command>server="192.168.1.1" \</command><co xml:id="co-dyn-dns-srv"/>
<command>serverport="53"</command><co xml:id="co-dyn-dns-srv-port"/></screen>
<command>serverport="53" \</command><co xml:id="co-dyn-dns-srv-port"/>
<command>op monitor timeout=30s interval=10s</command></screen>
<calloutlist>
<callout arearefs="co-dyn-dns-hostname">
<para>
Expand Down
3 changes: 2 additions & 1 deletion xml/geo_resources_i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
<screen>&prompt.crm.conf;<command>primitive ip-booth ocf:heartbeat:IPaddr2 \
params iflabel="ha" nic="eth1" cidr_netmask="24" \
params rule #cluster-name eq &cluster1; ip="192.168.201.100" \
params rule #cluster-name eq &cluster2; ip="192.168.202.100"</command>
params rule #cluster-name eq &cluster2; ip="192.168.202.100"\
op monitor timeout=20s interval=10s</command>
&prompt.crm.conf;<command>primitive booth-site ocf:pacemaker:booth-site \
meta resource-stickiness="INFINITY" \
params config="nfs" op monitor interval="10s"</command>
Expand Down
3 changes: 2 additions & 1 deletion xml/ha_configuring_resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,8 @@
<para>
Configure the primitive, for example:
</para>
<screen>&prompt.crm.conf;<command>primitive Apache apache</command></screen>
<screen>&prompt.crm.conf;<command>primitive Apache apache \
op monitor timeout=20s interval=10s</command></screen>
</step>
<step>
<para>
Expand Down
10 changes: 6 additions & 4 deletions xml/ha_fencing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,13 @@
</para>
<screen>&prompt.root;<command>crm configure</command>
&prompt.crm.conf;<command>primitive st-ibmrsa-1 stonith:external/ibmrsa-telnet \
params nodename=&node1; ip_address=192.168.0.101 \
username=USERNAME password=PASSW0RD</command>
params nodename=&node1; ip_address=192.168.0.101 \
username=USERNAME password=PASSW0RD \
op monitor timeout=20s interval=3600s</command>
&prompt.crm.conf;<command>primitive st-ibmrsa-2 stonith:external/ibmrsa-telnet \
params nodename=&node2; ip_address=192.168.0.102 \
username=USERNAME password=PASSW0RD</command>
params nodename=&node2; ip_address=192.168.0.102 \
username=USERNAME password=PASSW0RD \
op monitor timeout=20s interval=3600s</command>
&prompt.crm.conf;<command>location l-st-&node1; st-ibmrsa-1 -inf: &node1;</command>
&prompt.crm.conf;<command>location l-st-&node2; st-ibmrsa-2 -inf: &node2;</command>
&prompt.crm.conf;<command>commit</command></screen>
Expand Down
3 changes: 2 additions & 1 deletion xml/ha_gfs2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
Configure <literal>external/sbd</literal> as the fencing device:
</para>
<screen>&prompt.crm.conf;<command>primitive sbd_stonith stonith:external/sbd \
params pcmk_delay_max=30 meta target-role="Started"</command></screen>
params pcmk_delay_max=30 meta target-role="Started" \
op monitor timeout=20s interval=3600s</command></screen>
</step>
<step>
<para>
Expand Down
3 changes: 2 additions & 1 deletion xml/ha_ocfs2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@
Configure <literal>external/sbd</literal> as the fencing device:
</para>
<screen>&prompt.crm.conf;<command>primitive sbd_stonith stonith:external/sbd \
params pcmk_delay_max=30 meta target-role="Started"</command></screen>
params pcmk_delay_max=30 meta target-role="Started" \
op monitor timeout=20s interval=3600s</command></screen>
</step>
<step>
<para>
Expand Down
23 changes: 14 additions & 9 deletions xml/ha_resource_constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@
Another example is a location with ping:
</para>
<screen>&prompt.crm.conf;<command>primitive ping ping \
params name=ping dampen=5s multiplier=100 host_list="r1 r2"</command>
params name=ping dampen=5s multiplier=100 host_list="r1 r2" \
op monitor timeout=60s interval=10s</command>
&prompt.crm.conf;<command>clone cl-ping ping meta interleave=true</command>
&prompt.crm.conf;<command>location loc-node_pref internal_www \
rule 50: #uname eq &node1; \
Expand All @@ -302,8 +303,8 @@
<varname>loc-&node1;</varname>, referencing the virtual IP addresses
<varname>vip1</varname> and <varname>vip2</varname>:
</para>
<screen>&prompt.crm.conf;<command>primitive vip1 IPaddr2 params ip=&subnetI;.5</command>
&prompt.crm.conf;<command>primitive vip2 IPaddr2 params ip=&subnetI;.6</command>
<screen>&prompt.crm.conf;<command>primitive vip1 IPaddr2 params ip=&subnetI;.5 op monitor timeout=20s interval=10s</command>
&prompt.crm.conf;<command>primitive vip2 IPaddr2 params ip=&subnetI;.6 op monitor timeout=20s interval=10s</command>
&prompt.crm.conf;<command>location loc-&node1; { vip1 vip2 } inf: &node1;</command></screen>
<para>
In some cases it is much more efficient and convenient to use resource
Expand Down Expand Up @@ -725,8 +726,8 @@
two virtual IPs (<varname>vip1</varname> and <varname>vip2</varname>)
on the same node, <varname>&node1;</varname>:
</para>
<screen>&prompt.crm.conf;<command>primitive vip1 IPaddr2 params ip=&subnetI;.5</command>
&prompt.crm.conf;<command>primitive vip2 IPaddr2 params ip=&subnetI;.6</command>
<screen>&prompt.crm.conf;<command>primitive vip1 IPaddr2 params ip=&subnetI;.5 op monitor timeout=20s interval=10s</command>
&prompt.crm.conf;<command>primitive vip2 IPaddr2 params ip=&subnetI;.6 op monitor timeout=20s interval=10s</command>
&prompt.crm.conf;<command>location loc-&node1; { vip1 vip2 } inf: &node1;</command></screen>
</example>
<para>
Expand Down Expand Up @@ -1534,16 +1535,20 @@
&prompt.crm.conf;<command>node &node3; utilization hv_memory="4000"</command>
&prompt.crm.conf;<command>primitive xenA Xen \
utilization hv_memory="3500" meta priority="10" \
params xmfile="/etc/xen/shared-vm/vm1"</command>
params xmfile="/etc/xen/shared-vm/vm1" \
op monitor timeout=30s interval=10s</command>
&prompt.crm.conf;<command>primitive xenB Xen \
utilization hv_memory="2000" meta priority="1" \
params xmfile="/etc/xen/shared-vm/vm2"</command>
params xmfile="/etc/xen/shared-vm/vm2" \
op monitor timeout=30s interval=10s</command>
&prompt.crm.conf;<command>primitive xenC Xen \
utilization hv_memory="2000" meta priority="1" \
params xmfile="/etc/xen/shared-vm/vm3"</command>
params xmfile="/etc/xen/shared-vm/vm3" \
op monitor timeout=30s interval=10s</command>
&prompt.crm.conf;<command>primitive xenD Xen \
utilization hv_memory="1000" meta priority="5" \
params xmfile="/etc/xen/shared-vm/vm4"</command>
params xmfile="/etc/xen/shared-vm/vm4" \
op monitor timeout=30s interval=10s</command>
&prompt.crm.conf;<command>property placement-strategy="minimal"</command></screen>
<para>
With all three nodes up, xenA is placed onto a node first, followed
Expand Down
15 changes: 10 additions & 5 deletions xml/ha_storage_protection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,11 @@ Received command test from &node2; on disk /dev/disk/by-id/<replaceable>DEVICE_I
and survives in a split-brain scenario:
</para>
<screen>&prompt.crm.conf;<command>primitive st-sbd-&node1; stonith:external/sbd params \
pcmk_host_list=&node1; pcmk_delay_base=20</command>
pcmk_host_list=&node1; pcmk_delay_base=20 \
op monitor timeout=20s interval=3600s</command>
&prompt.crm.conf;<command>primitive st-sbd-&node2; stonith:external/sbd params \
pcmk_host_list=&node2; pcmk_delay_base=0</command></screen>
pcmk_host_list=&node2; pcmk_delay_base=0 \
op monitor timeout=20s interval=3600s</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -891,7 +893,8 @@ pcmk_host_list=&node2; pcmk_delay_base=0</command></screen>
a unified fencing resource targeting multiple nodes.
</para>
<screen>&prompt.crm.conf;<command>primitive stonith_sbd stonith:external/sbd \
params pcmk_delay_max=30</command></screen>
params pcmk_delay_max=30 \
op monitor timeout=20s interval=3600s</command></screen>
<warning>
<title><parameter>pcmk_delay_max</parameter> might not prevent double reset
in a split-brain scenario</title>
Expand Down Expand Up @@ -1226,7 +1229,8 @@ Illegal request, Invalid opcode</screen>
<para> Add a file system primitive for Ext4, using a stable device name for
the disk partition: </para>
<screen>&prompt.crm.conf;<command>primitive ext4 Filesystem \
params device="/dev/disk/by-id/<replaceable>DEVICE_ID</replaceable>" directory="/mnt/ext4" fstype=ext4</command></screen>
params device="/dev/disk/by-id/<replaceable>DEVICE_ID</replaceable>" directory="/mnt/ext4" fstype=ext4 \
op monitor timeout=40s interval=20s</command></screen>
</step>
<step>
<para> Add the following order relationship plus a collocation between the
Expand Down Expand Up @@ -1633,7 +1637,8 @@ Illegal request, Invalid opcode</screen>
If you changed diskless SBD to disk-based SBD, you must configure a &stonith; resource
for SBD. For example:
</para>
<screen>&prompt.root;<command>crm configure primitive stonith-sbd stonith:external/sbd</command></screen>
<screen>&prompt.root;<command>crm configure primitive stonith-sbd stonith:external/sbd \
op monitor timeout=20s interval=3600s</command></screen>
<para>
For more information, see <xref linkend="st-ha-storage-protect-fencing-static-random"/> in
<xref linkend="pro-ha-storage-protect-fencing"/>.
Expand Down