fence_mpath: new fence agent for dm-multipath based on mpathpersist
PATCH 1/1 fence_mpath: new fence agent for dm-multipath based on mpathpersist
Previously, scenario with multipath and underlying SCSI devices was solved by using fence_scsi what works correctly but there are some limitation. The most important is that unfencing has to be done when all paths are available as it is executed only once. This new fence agent solve this situation properly as most of this situations are solved by mpathpersist which is part of dm-multipath.
--- configure.ac | 3 + fence/agents/mpath/Makefile.am | 17 +++ fence/agents/mpath/fence_mpath.py | 247 ++++++++++++++++++++++++++++++++++++ make/fencebuild.mk | 2 + tests/data/metadata/fence_mpath.xml | 86 +++++++++++++ 5 files changed, 355 insertions(+) create mode 100644 fence/agents/mpath/Makefile.am create mode 100644 fence/agents/mpath/fence_mpath.py create mode 100644 tests/data/metadata/fence_mpath.xml
configure.ac +3 -0
@@ -172,6 +172,8 @@ AC_PATH_PROG([COROSYNC_CMAPCTL_PATH], [corosync-cmapctl], [/usr/sbin/corosync-cm AC_PATH_PROG([SG_PERSIST_PATH], [sg_persist], [/usr/bin/sg_persist]) AC_PATH_PROG([SG_TURS_PATH], [sg_turs], [/usr/bin/sg_turs]) AC_PATH_PROG([VGS_PATH], [vgs], [/usr/sbin/vgs]) +AC_PATH_PROG([MPATH_PATH], [mpathpersist], [/usr/sbin/mpathpersist]) + ## do subst AC_SUBST([DEFAULT_CONFIG_DIR])
@@ -292,6 +294,7 @@ AC_CONFIG_FILES([Makefile fence/agents/lib/Makefile fence/agents/lpar/Makefile fence/agents/manual/Makefile + fence/agents/mpath/Makefile fence/agents/netio/Makefile fence/agents/ovh/Makefile fence/agents/pve/Makefile
fence/agents/mpath/Makefile.am new file +17 -0
@@ -0,0 +1,17 @@ +MAINTAINERCLEANFILES = Makefile.in + +TARGET = fence_mpath + +SRC = $(TARGET).py + +EXTRA_DIST = $(SRC) + +sbin_SCRIPTS = $(TARGET) + +man_MANS = $(TARGET).8 + +FENCE_TEST_ARGS = -k 1 + +include $(top_srcdir)/make/fencebuild.mk +include $(top_srcdir)/make/fenceman.mk +include $(top_srcdir)/make/agentpycheck.mk
fence/agents/mpath/fence_mpath.py new file +247 -0
247 lines not on this page · raw message
make/fencebuild.mk +2 -0
@@ -16,6 +16,8 @@ $(TARGET): $(SRC) -e 's#@''SG_PERSIST_PATH@#${SG_PERSIST_PATH}#g' \ -e 's#@''SG_TURS_PATH@#${SG_TURS_PATH}#g' \ -e 's#@''VGS_PATH@#${VGS_PATH}#g' \ + -e 's#@''MPATH_PATH@#${MPATH_PATH}#g' \ + -e 's#@''STORE_PATH@#${CLUSTERVARRUN}#g' \ > $@ if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \
tests/data/metadata/fence_mpath.xml new file +86 -0
86 lines not on this page · raw message
Signature · 1 line
1.9.3