These resource agents plug glusterd into Open Cluster Framework
(OCF) compliant cluster resource managers, like Pacemaker.
The glusterd RA is fairly trivial; it simply manages the glusterd daemon
like any upstart or systemd job would, except that Pacemaker can
do it in a cluster-aware fashion.
The volume RA is a bit more involved; It starts a volume and monitors
individual brick's daemons in a cluster aware fashion, recovering bricks
when their processes fail.
Note that this does NOT imply people would deploy GlusterFS servers
in pairs, or anything of that nature. Pacemaker has the ability to
deploy cluster resources as clones, meaning glusterd and volumes would be
configured as follows in a Pacemaker cluster:
primitive p_glusterd ocf:glusterfs:glusterd \
op monitor interval="30"
primitive p_volume_demo ocf:glusterfs:volume \
params volname="demo" \
op monitor interval="10"
clone cl_glusterd p_glusterd \
clone cl_volume_demo p_volume_demo \
meta interleave="true" ordered="true"
colocation c_volume_on_glusterd inf: cl_volume_demo cl_glusterd
order o_glusterd_before_volume 0: cl_glusterd cl_volume_demo
The cluster status then looks as follows (in a 4-node cluster; note
the configuration above could be applied, unchanged, to a cluster
of any number of nodes):
Last updated: Fri Mar 30 10:54:50 2012
Last change: Thu Mar 29 17:20:17 2012 via crmd on gluster02.h
Current DC: gluster03.h - partition with quorum
4 Nodes configured, 4 expected votes
8 Resources configured.
Online: [ gluster02.h gluster03.h gluster04.h gluster01.h ]
Clone Set: cl_glusterd [p_glusterd]
Started: [ gluster02.h gluster03.h gluster04.h gluster01.h ]
Clone Set: cl_volume_demo [p_volume_demo]
Started: [ gluster01.h gluster02.h gluster03.h gluster04.h ]
This is also a way of providing automatic glusterd and brick recovery
in systems where neither upstart nor systemd are available.
Signed-off-by: Florian Haas <email@example.com>
Tested-by: Gluster Build System <firstname.lastname@example.org>
Reviewed-by: Anand Avati <email@example.com>