OCF_HEARTBEAT_GCP-V(7)
π
ocf_heartbeat_gcp-vpc-move-ip (a.k.a. the gcp-vpc-move-ip page, section 7 of the OCF resource agents manual) β¨
okay so buckle up bestie, we're moving a floating IP around inside a GCP VPC and honestly? it's giving infrastructure main character energy π
π SYNOPSIS π
gcp-vpc-move-ip [start | stop | monitor | meta-data | validate-all]
β¨ DESCRIPTION β¨
okay so this is a Resource Agent whose whole personality is moving a floating IP address around inside a GCP VPC β and it does it by literally just changing one entry in the routing table. slay. it also configures that floating IP locally on the instance's OS, so the box actually knows what's up π
π«Ά the requirements (do NOT skip these, i'm serious)
- IP forwarding must be enabled on all instances β all of them, no exceptions, because that's the only way the route can actually be terminated β¨
- The floating IP address must be chosen so that it's outside all existing subnets in the VPC network β like, pick one that doesn't collide with anything already living there π
- IAM permissions (peep
https://cloud.google.com/compute/docs/access/iam-permissionsfor the full tea β):compute.routes.delete,compute.routes.getandcompute.routes.updateon the routecompute.networks.updatePolicyon the network (needed to add a new route)compute.networks.geton the network (to check the VPC network actually exists)compute.routes.liston the project (to check for conflicting routes)
π SUPPORTED PARAMETERS π
gcloudβ path to the command line tools for GCP. (optional, string, default"/usr/bin/gcloud")configurationβ named configuration forgcloud. (optional, string, default"default")ipβ the floating IP address. heads up bestie: this IP must be chosen outside of all existing subnet ranges. (unique, required, string, no default)vpc_networkβ name of the VPC network. (required, string, default"default")interfaceβ name of the network interface. (optional, string, default"eth0")route_nameβ route name. (unique, optional, string, default"ra-gcp-vpc-move-ip")
π₯ SUPPORTED ACTIONS π₯
this resource agent supports the following actions (operations), and yes these timeouts are real, respect them π€
startβ starts the resource. suggested minimum timeout:180s.stopβ stops the resource. suggested minimum timeout:180s.monitorβ performs a detailed status check. suggested minimum timeout:30s. suggested interval:60s.validate-allβ performs a validation of the resource configuration. suggested minimum timeout:5s.meta-dataβ retrieves resource agent metadata (internal use only β not for you, bestie π). suggested minimum timeout:5s.
πΈ EXAMPLE CRM SHELL πΈ
here's an example config for a gcp-vpc-move-ip resource using the crm(8) shell β copy it, it's cute:
primitive p_gcp-vpc-move-ip ocf:heartbeat:gcp-vpc-move-ip \
params \
ip=string \
vpc_network="default" \
op monitor depth="0" timeout="30s" interval="60s"
π¦ EXAMPLE PCS π¦
and here's the same vibe for pcs(8):
pcs resource create p_gcp-vpc-move-ip ocf:heartbeat:gcp-vpc-move-ip \
ip=string \
vpc_network="default" \
op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="60s"
π ngl, notice thedepth="0"in the crm shell version vsOCF_CHECK_LEVEL="0"in the pcs one β that's just how each tool spells it, don't come for me.
π SEE ALSO π
http://clusterlabs.org/ β go say hi to the clusterlabs girlies β¨
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors) π«Ά
and that's the whole page, bestie!! this was resource-agents version UNKNOWN, dated 10/01/2026 β iconic, timeless, undated-in-spirit πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms