Skip to content

Instantly share code, notes, and snippets.

@ethaniel
Created May 20, 2024 17:38
Show Gist options
  • Save ethaniel/03dff6e8e12fd11fd74fb26460460d82 to your computer and use it in GitHub Desktop.
Save ethaniel/03dff6e8e12fd11fd74fb26460460d82 to your computer and use it in GitHub Desktop.
Batch update resource timeouts in pacemaker

I needed to batch update the monitor and stop timeouts in all of my pacemaker resources. I didn't want to rely on the default values, so I wrote this oneliner:

pcs resource | awk '{print $2}' | while read RESOURCE; do pcs resource update $RESOURCE op start timeout=20s op stop timeout=200s op monitor interval=10s timeout=200s; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment