OCF_HEARTBEAT_PODMAN(7)

πŸ’… OCF_HEARTBEAT_PODMAN(7) β€” like, the Podman container resource agent, bestie

okay so this is a page from the OCF resource agents manual, and honestly? it's giving container-manager realness. sit down, grab a boba, we're gonna go through it together πŸ§‹βœ¨


🌸 NAME 🌸

ocf_heartbeat_podman β€” the Podman container resource agent. that's it, that's the name, she's iconic πŸ’…


✨ SYNOPSIS ✨

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

like, you literally just call her with one of those and she handles it, no cap 🫢


πŸŽ€ DESCRIPTION πŸŽ€

so the podman HA resource agent creates and launches a podman container, all based off a podman image you supply. and the way she works? containers managed by this agent are both created and removed when the agent runs its start and stop actions. so like, she's not just vibing in the background β€” she's very much a main character who shows up and also leaves. periodt πŸ’€


πŸ”₯ SUPPORTED PARAMETERS πŸ”₯

okay this is the part where you gotta pay attention because these are the knobs you're turning. one bullet per param, no skipping, we're doing all of them:

  • image β€” the podman image to base this container off of. (required, string, no default) β€” yes bestie, required, you literally cannot skip this one πŸ™ˆ
  • name β€” the name to give the created container. by default this will be that resource's instance name. (optional, string, no default)
  • allow_pull β€” allow the image to be pulled from the configured podman 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. (optional, boolean, no default) β€” so like, network pull = slow start, plan accordingly ⏳
  • run_opts β€” add options to be appended to the podman run command which is used when creating the container during the start action. this option allows users to do things such as setting a custom entry point and injecting environment variables into the newly created container. note the -d option is supplied regardless of this value to force containers to run in the background. (optional, string, no default)
⚠️ 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. like, she's got it handled, don't fight her on this πŸ’…
  • run_cmd β€” specify a command to launch within the container once it has initialized. (optional, string, 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. (optional, string, no default) β€” she's proactive, we love that for her ✨
  • 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. (optional, string, no default)
😭 Note: using this method for monitoring processes inside a container is not recommended, as containerd 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. like, let her self-regulate, she's got this 🌸
  • force_kill β€” kill a container immediately rather than waiting for it to gracefully shutdown. (optional, boolean, no default) β€” no chill, just vibes πŸ’€
  • reuse β€” allow the container to be reused once it is stopped. by default, containers get removed once they are stopped. enable this option to have the particular one persist when this happens. (optional, boolean, default 0)
  • drop_in_dependency β€” use transient drop-in files to add extra dependencies to the systemd scopes associated to the container. during reboot, this prevents systemd to stop the container before pacemaker. (optional, boolean, no default) β€” she's keeping the order of operations, very organized πŸ‘‘

🌈 SUPPORTED ACTIONS 🌈

this resource agent supports the following actions (operations), and yes, each one has a suggested minimum timeout, don't @ me:

  • 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 πŸ¦‹

the following is an example configuration for a podman resource using the crm(8) shell β€” copy it, love it, ship it:

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

πŸ’œ EXAMPLE PCS πŸ’œ

and here's the same energy with pcs(8):

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

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ“ AUTHOR πŸ“

ClusterLabs contributors (see the resource agent source for information about individual authors). absolute icons, all of them 🫢


and that's the whole page bestie, you ate that πŸ’…βœ¨

🌸 so yeah β€” this was resource-agents version UNKNOWN, dated 10/01/2026, from the OCF_HEARTBEAT_PODMAN(7) page. mwah, go forth and containerize πŸ’–

πŸ“¦ where this page comes from