OCF_HEARTBEAT_IPSRCA(7)

πŸ’… ocf_heartbeat_IPsrcaddr β€” the girlies' guide to preferred source addresses ✨

Okay bestie, buckle up, because this one's from the OCF resource agents manual, section 7 β€” it's ocf_heartbeat_IPsrcaddr, and it's lowkey iconic for what it does. πŸŽ€


🌸 NAME 🌸

ocf_heartbeat_IPsrcaddr β€” literally manages the preferred source address for outgoing IP packets. That's the whole vibe. πŸ‘‘


✨ SYNOPSIS ✨

IPsrcaddr [start | stop | monitor | meta-data | validate-all]

That's it, that's the whole thing. One resource, five lil actions. Slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the resource script for IPsrcaddr, and what it does is manage the modification of your preferred source address. Main character energy for your packets fr fr. ⭐

Note, and this one matters: DHCP should not be enabled for the interface serving the preferred source address. Enabling DHCP may result in unexpected behavior, such as the automatic addition of duplicate or conflicting routes. That may cause the IPsrcaddr resource to fail, or it may produce undesired behavior while the resource continues to run. Not me warning you twice 😭 β€” please, no DHCP on that interface. πŸ™ˆ

πŸ’– SUPPORTED PARAMETERS πŸ’–

  • ipaddress β€” The IP address. That's literally it. (required, string, no default) πŸ‘‘
  • cidr_netmask β€” The netmask for the interface, in CIDR format (ie, 24), or in dotted quad notation 255.255.255.0. (optional, string, no default) πŸŽ€
  • destination β€” The destination IP/subnet for the route. (optional, string, default "0.0.0.0/0") πŸ¦‹
  • proto β€” Proto to match when finding network. E.g. "kernel". (optional, string, no default) 🌸
  • metric β€” Metric. Only needed if incorrect metric value is used. (optional, string, no default) πŸ’…
  • pref β€” IPv6 route preference (low, medium or high). Only needed if incorrect pref value is used. (optional, string, no default) 🌈
  • table β€” Table to modify and use for interface lookup. E.g. "local". The table has to have a route matching the destination parameter. This can be used for policy based routing. See man ip-rule(8). (optional, string, no default) 🧚

πŸ”₯ SUPPORTED ACTIONS πŸ”₯

This resource agent supports the following actions (operations), and yes, every single one got its own suggested minimum timeout because the agent is thorough like that πŸ’œ

  • start β€” Starts the resource. Suggested minimum timeout: 20s. ⭐
  • stop β€” Stops the resource. Suggested minimum timeout: 20s. ⭐
  • monitor β€” Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 10s. πŸ‘‘
  • validate-all β€” Performs a validation of the resource configuration. Suggested minimum timeout: 5s. πŸŽ€
  • meta-data β€” Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. 🫢

πŸ“ EXAMPLE CRM SHELL πŸ“

The following is an example configuration for a IPsrcaddr resource using the crm(8) shell:

primitive p_IPsrcaddr ocf:heartbeat:IPsrcaddr \
  params \
    ipaddress=string \
  op monitor depth="0" timeout="20s" interval="10s"

Copy it, paste it, live your truth. πŸ’–


🌈 EXAMPLE PCS 🌈

The following is an example configuration for a IPsrcaddr resource using pcs(8):

pcs resource create p_IPsrcaddr ocf:heartbeat:IPsrcaddr \
  ipaddress=string \
  op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"

Same energy, different CLI. Both ate, ngl. πŸ’…


🫢 SEE ALSO 🫢


πŸ’œ AUTHOR πŸ’œ

ClusterLabs contributors β€” see the resource agent source for information about individual authors. Shoutout to every one of them, they're the real MVPs πŸ₯ΉπŸ’–


Sign-off time, bestie: this page is from resource-agents, version UNKNOWN, dated 10/01/2026, and the manual page itself is OCF_HEARTBEAT_IPSRCA(7). Now go forth and route responsibly βœ¨πŸ§šπŸ’œ
πŸ“¦ where this page comes from