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 all commits
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
7 changes: 4 additions & 3 deletions xml/article_pacemaker_remote.xml
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,8 @@ ssh: connect to host &node4; port 3121: Connection refused</screen>
<screen>&prompt.root;<command>crm configure</command>
&prompt.crm.conf;<command>primitive vm-&node4; ocf:heartbeat:VirtualDomain \
params hypervisor="qemu:///system" \
config="/etc/pacemaker/&node4;.xml" \
meta remote-node=&node4;</command></screen>
config="/etc/pacemaker/&node4;.xml" \
meta remote-node=&node4;</command></screen>
<para>
&pace; automatically monitors &pmrm; connections for failure,
so it is not necessary to create a recurring monitor on the
Expand Down 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
4 changes: 2 additions & 2 deletions xml/ha_config_cli.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ crm cluster join ssh --use-ssh-agent -c <replaceable>USER@NODE1</replaceable></c
You can leave out the <literal>params</literal> section if it is the first and only section.
For example, this line:
</para>
<screen>&prompt.root;<command>crm primitive ipaddr IPaddr2 params ip=192.168.0.55</command></screen>
<screen>&prompt.root;<command>crm configure primitive ipaddr IPaddr2 params ip=192.168.0.55</command></screen>
<para>is equivalent to this line:</para>
<screen>&prompt.root;<command>crm primitive ipaddr IPaddr2 ip=192.168.0.55</command></screen>
<screen>&prompt.root;<command>crm configure primitive ipaddr IPaddr2 ip=192.168.0.55</command></screen>
</listitem>
<listitem>
<formalpara>
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
8 changes: 4 additions & 4 deletions xml/ha_fencing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@
</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</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</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
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
13 changes: 7 additions & 6 deletions xml/ha_storage_protection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,10 @@ Received command test from &node2; on disk /dev/disk/by-id/<replaceable>DEVICE_I
devices. In the following configuration, &node1; wins
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>
&prompt.crm.conf;<command>primitive st-sbd-&node2; stonith:external/sbd params \
pcmk_host_list=&node2; pcmk_delay_base=0</command></screen>
<screen>&prompt.crm.conf;<command>primitive st-sbd-&node1; stonith:external/sbd \
params pcmk_host_list=&node1; pcmk_delay_base=20</command>
&prompt.crm.conf;<command>primitive st-sbd-&node2; stonith:external/sbd \
params pcmk_host_list=&node2; pcmk_delay_base=0</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -891,7 +891,7 @@ 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</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 +1226,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