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-permissions for the full tea β˜•):
    1. compute.routes.delete, compute.routes.get and compute.routes.update on the route
    2. compute.networks.updatePolicy on the network (needed to add a new route)
    3. compute.networks.get on the network (to check the VPC network actually exists)
    4. compute.routes.list on 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 for gcloud. (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 the depth="0" in the crm shell version vs OCF_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