OCF_HEARTBEAT_RKT(7)

πŸ’– OCF_HEARTBEAT_RKT πŸ’–

okay bestie, gather round, because today we're learning about ocf_heartbeat_rkt β€” the rkt container resource agent, from the OCF resource agents collection (that's the manual it lives in, section 7, iykyk). she's a whole vibe and she manages containers for you. let's go πŸš€


✨ NAME ✨

ocf_heartbeat_rkt β€” the rkt container resource agent. that's her. that's the girl. πŸ’…


🌸 SYNOPSIS 🌸

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

those are your moves, bestie. pick one.


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? this HA resource agent creates and launches a container based off a supplied image. that's the whole gig.

and here's the tea: containers managed by this agent are both created and removed upon the agent's start and stop actions. so when she starts, she builds it; when she stops, she deletes it. no leftover clutter, no mess, we love a clean girl. ✨


πŸŽ€ SUPPORTED PARAMETERS πŸŽ€

🌈 image

the image to base this container off of. you literally cannot skip this one, she's mandatory.

  • type: string
  • required: yes (required)
  • default: none (no default)

🌈 name

the name to give the created container. and by default? this will be that resource's instance name. cute, right?

  • type: string
  • optional
  • default: none (no default)

🌈 allow_pull

allow the image to be pulled from the configured registry when the image does not exist locally. 🫢

⚠️ NOTE: this can drastically increase the time required to start the container if the image repository is pulled over the network. so like, it's giving "waiting forever" energy. plan accordingly bestie. 😭
  • type: boolean
  • optional
  • default: none (no default)

🌈 run_opts

add options to be appended to the 'rkt run' command, which is used when creating the container during the start action. this option lets users do things such as setting a custom entry point and injecting environment variables into the newly created container. very main character of you. πŸ’…

⚠️ NOTE: Do not explicitly specify the --name argument in the run_opts. This agent will set --name using either the resource's instance or the name provided in the 'name' argument of this agent. she handles the naming, you just vibe.
  • type: string
  • optional
  • default: none (no default)

🌈 run_cmd

specify a command to launch within the container once it has initialized. one command, one destiny. ⭐

  • type: string
  • optional
  • default: none (no default)

🌈 mount_points

a comma separated list of directories that the container is expecting to use. the agent will ensure they exist by running 'mkdir -p'. she's proactive like that. 🧚

  • type: string
  • optional
  • default: none (no default)

🌈 monitor_cmd

specify the full path of a command to launch within the container to check the health of the container. this command must return 0 to indicate that the container is healthy. a non-zero return code will indicate that the container has failed and should be recovered. πŸ”₯

πŸ’€ Note: Using this method for monitoring processes inside a container is not recommended, as rkt tries to track processes running inside the container and does not deal well with many short-lived processes being spawned. Ensure that your container monitors its own processes and terminates on fatal error rather than invoking a command from the outside.
  • type: string
  • optional
  • default: none (no default)

🌈 force_kill

kill a container immediately rather than waiting for it to gracefully shutdown. dramatic? yes. effective? also yes. πŸ’…

  • type: boolean
  • optional
  • default: none (no default)

πŸ‘‘ SUPPORTED ACTIONS πŸ‘‘

this resource agent supports the following actions (operations). let's meet the cast:

  • start β€” starts the resource. suggested minimum timeout: 90s.
  • stop β€” stops the resource. suggested minimum timeout: 90s.
  • monitor β€” performs a detailed status check. suggested minimum timeout: 30s. suggested interval: 30s.
  • meta-data β€” retrieves resource agent metadata (internal use only). suggested minimum timeout: 5s.
  • validate-all β€” performs a validation of the resource configuration. suggested minimum timeout: 30s.

πŸ“ EXAMPLE CRM SHELL πŸ“

here's an example configuration for a rkt resource using the crm(8) shell:

primitive p_rkt ocf:heartbeat:rkt \
  params \
    image=string \
  op monitor timeout="30s" interval="30s" depth="0"

look at her go. iconic. ✨


πŸ’œ EXAMPLE PCS πŸ’œ

and here's an example configuration for a rkt resource using pcs(8):

pcs resource create p_rkt ocf:heartbeat:rkt \
  image=string \
  op monitor timeout="30s" interval="30s" OCF_CHECK_LEVEL="0"

same energy, different tool. slay. πŸ’–


🌈 SEE ALSO 🌈


🌸 AUTHOR 🌸

ClusterLabs contributors (see the resource agent source for information about individual authors). thank you for your service, legends. 🫢


okay that's the whole page!! and before you close the tab β€” this lil cutie is from resource-agents, version UNKNOWN, dated 04/08/2026. no cap. now go forth and containerize responsibly, bestie πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from