- What we know
- What we've created
- Hints and Kinks
- Checking Corosync cluster membership
- Configuring radosgw to behave like Amazon S3
- Downgrading to DRBD 8.3
- Fencing in Libvirt/KVM virtualized cluster nodes
- Fencing in VMware virtualized Pacemaker nodes
- GFS2 in Pacemaker (Debian/Ubuntu)
- Interleaving in Pacemaker clones
- Maintenance in active Pacemaker clusters
- Managing cron jobs with Pacemaker
- Mandatory and advisory ordering in Pacemaker
- Migrating virtual machines from block-based storage to RADOS/Ceph
- Network connectivity check in Pacemaker
- OCFS2 in Pacemaker (Debian/Ubuntu)
- Solid-state drives and Ceph OSD journals
- Solve a DRBD split-brain in 4 steps
- Testing Pacemaker clusters
- Totem "Retransmit List" in Corosync
- Turning Ceph RBD Images into SAN Storage Devices
- Which OSD stores a specific RADOS object?
- Presentations
- Ceph Tutorial (LCA 2013)
- Ceph: The Storage Stack for OpenStack (OpenStack Israel 2013)
- Die eigene Cloud mit OpenStack Essex (German, LinuxTag 2012)
- Fencing (LCE 2011)
- GlusterFS in HA Clusters (LCEU 2012)
- GlusterFS und Ceph (German, CeBIT 2012)
- Hands-On With Ceph (LCEU 2012)
- High Availability Update (OpenStack Summit Fall 2012)
- High Availability in OpenStack (CloudOpen 2012)
- High Availability in OpenStack (OpenStack Conference Spring 2012)
- Highly Available Cloud: Pacemaker integration with OpenStack (OSCON 2012)
- Mit OpenStack zur eigenen Cloud (German, CLT 2012)
- Mit OpenStack zur eigenen Cloud (German, OSDC 2012)
- More Reliable, More Resilient, More Redundant (OpenStack Summit April 2013)
- MySQL HA Deep Dive (MySQL Conference 2012)
- MySQL High Availability Deep Dive (PLUK 2012)
- MySQL High Availability Sprint (PLUK 2011)
- OpenStack Essex im Praxistest (German, Linuxwochen Wien 2012)
- OpenStack High Availability Update (Grizzly and Havana)
- Roll Your Own Cloud (LCA 2011)
- Storage Replication in HPHA (LCA 2012)
- Zen of Pacemaker (LCA 2012)
- hastexo in 100 Seconds
- Technical documentation
- News releases
- Hints and Kinks
- What we charge
- What others say

"GlusterFS" is a trademark or registered trademark of Red Hat, Inc.
"DRBD" is a registered trademark of LINBIT Information Technologies GmbH.
Managing cron jobs with Pacemaker
It's not uncommon in Pacemaker clusters to run specific cron jobs only on a node that currently runs a particular resource. The ocf:heartbeat:symlink resource agent can be exceptionally helpful in this situation. Here's how to use it.
Suppose you've got a cron job for Postfix whose definition normally lives in /etc/cron.d/postfix. All your Postfix related data is in a mountpoint /srv/postfix (that filesystem could live on iSCSI, or DRBD, or it could be a GlusterFS mount – that's irrelevant for the purposes of this discussion). And as such, you've moved your cron definition to /srv/postfix/cron.
Now you want that cron job to execute only on the node that also is currently the active Postfix host. That's not hard at all:
primitive p_postfix ocf:heartbeat:postfix \
params config_dir="/etc/postfix" \
op monitor interval="10"
primitive p_symlink ocf:heartbeat:symlink \
params target="/srv/postfix/cron" \
link="/etc/cron.d/postfix" \
backup_suffix=".disabled" \
op monitor interval="10"
primitive p_cron lsb:cron \
op monitor interval=10
order o_symlink_before_cron inf: p_symlink p_cron
colocation c_cron_on_symlink inf: p_cron p_symlink
colocation c_symlink_on_postfix inf: p_symlink p_postfix
What this will do for you is this:
- Check whether a file named
postfixalready exists in/etc/cron.d - If it does, rename it to
postfix.disabled(remember, cron ignores job definitions with dots in the filename) - (Re-)Create the
postfixjob definition as a symlink to/srv/postfix/cron - Restart cron when it's done.
The c_symlink_on_postfix colocation ensures that all of this happens on the node where the p_postfix resource is also active.
- Anmelden oder Registrieren um Kommentare zu schreiben
