table of contents
OCF_HEARTBEAT_IPADDR(7) | OCF resource agents | OCF_HEARTBEAT_IPADDR(7) |
NAME¶
ocf_heartbeat_IPaddr2 - Manages virtual IPv4 and IPv6 addresses (Linux specific version)
SYNOPSIS¶
IPaddr2 [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION¶
This Linux-specific resource manages IP alias IP addresses. It can add an IP alias, or remove one. In addition, it can implement Cluster Alias IP functionality if invoked as a clone resource.
If used as a clone, "shared address with a trivial, stateless (autonomous) load-balancing/mutual exclusion on ingress" mode gets applied (as opposed to "assume resource uniqueness" mode otherwise). For that, Linux firewall (kernel and userspace) is assumed, and since recent distributions are ambivalent in plain "iptables" command to particular back-end resolution, "iptables-legacy" (when present) gets prioritized so as to avoid incompatibilities (note that respective ipt_CLUSTERIP firewall extension in use here is, at the same time, marked deprecated, yet said "legacy" layer can make it workable, literally, to this day) with "netfilter" one (as in "iptables-nft"). In that case, you should explicitly set clone-node-max >= 2, and/or clone-max < number of nodes. In case of node failure, clone instances need to be re-allocated on surviving nodes. This would not be possible if there is already an instance on those nodes, and clone-node-max=1 (which is the default).
When the specified IP address gets assigned to a respective interface, the resource agent sends unsolicited ARP (Address Resolution Protocol, IPv4) or NA (Neighbor Advertisement, IPv6) packets to inform neighboring machines about the change. This functionality is controlled for both IPv4 and IPv6 by shared 'arp_*' parameters.
SUPPORTED PARAMETERS¶
ip
(unique, required, string, no default)
nic
Do NOT specify an alias interface in the form eth0:1 or anything here; rather, specify the base interface only. If you want a label, see the iflabel parameter.
Prerequisite:
There must be at least one static IP address, which is not managed by the cluster, assigned to the network interface. If you can not assign any static IP address on the interface, modify this kernel parameter:
sysctl -w net.ipv4.conf.all.promote_secondaries=1 # (or per device)
(optional, string, no default)
cidr_netmask
If unspecified, the script will also try to determine this from the routing table.
(optional, string, no default)
broadcast
(optional, string, no default)
proto
(optional, string, no default)
iflabel
The kernel allows alphanumeric labels up to a maximum length of 15 characters including the interface name and colon (e.g. eth0:foobar1234)
A label can be specified in nic parameter but it is deprecated. If a label is specified in nic name, this parameter has no effect.
(optional, string, no default)
lvs_support
Notes for IPv6: It is not necessary to enable this option on IPv6. Instead, enable 'lvs_ipv6_addrlabel' option for LVS-DR usage on IPv6.
(optional, boolean, default false)
lvs_ipv6_addrlabel
See also 'lvs_ipv6_addrlabel_value' parameter.
(optional, boolean, default true)
lvs_ipv6_addrlabel_value
(optional, integer, default 99)
mac
(optional, string, no default)
clusterip_hash
(optional, string, default "sourceip-sourceport")
unique_clone_address
(optional, boolean, default false)
arp_interval
This parameter is deprecated and used for the backward compatibility only. It is effective only for the send_arp binary which is built with libnet, and send_ua for IPv6. It has no effect for other arp_sender.
(optional, integer, default 200)
arp_count
(optional, integer, default 5)
arp_count_refresh
(optional, integer, default 0)
arp_bg
(optional, string, no default)
arp_sender
(optional, string, no default)
send_arp_opts
A typical use case is specifying '-A' for iputils_arping to use ARP REPLY instead of ARP REQUEST as Gratuitous ARPs.
(optional, string, no default)
flush_routes
(optional, boolean, default false)
run_arping
(optional, string, default "false")
nodad
(optional, string, default "false")
noprefixroute
(optional, string, default "false")
preferred_lft
(optional, string, default "forever")
network_namespace
(optional, string, no default)
SUPPORTED ACTIONS¶
This resource agent supports the following actions (operations):
start
stop
status
monitor
meta-data
validate-all
EXAMPLE CRM SHELL¶
The following is an example configuration for a IPaddr2 resource using the crm(8) shell:
primitive p_IPaddr2 ocf:heartbeat:IPaddr2 \
params \
ip=string \
op monitor depth="0" timeout="20s" interval="10s"
EXAMPLE PCS¶
The following is an example configuration for a IPaddr2 resource using pcs(8)
pcs resource create p_IPaddr2 ocf:heartbeat:IPaddr2 \
ip=string \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"
SEE ALSO¶
AUTHOR¶
ClusterLabs contributors (see the resource agent source for information about individual authors)
11/19/2024 | resource-agents UNKNOWN |