From e6b7c9c041d40662a0355f7ae69c7963a0f06236 Mon Sep 17 00:00:00 2001 From: Michiro Hibari Date: Tue, 20 Oct 2015 13:04:20 +0900 Subject: [PATCH] =?utf8?q?Heartbeat/Pacemaker=E7=94=A8=E3=81=AERA=E3=81=8B?= =?utf8?q?=E3=82=89VIPcheck=E3=82=92=E5=89=8A=E9=99=A4=20Pacemaker(pm=5Fex?= =?utf8?q?tras)=E3=81=AB=E5=90=8C=E6=A2=B1=E3=81=95=E3=82=8C=E3=81=A6?= =?utf8?q?=E3=81=84=E3=82=8BVIPcheck=E3=82=92=E3=81=94=E5=88=A9=E7=94=A8?= =?utf8?q?=E3=81=8F=E3=81=A0=E3=81=95=E3=81=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- doc/heartbeat-ra/VIPcheck | 150 ---------------------------------------------- 1 file changed, 150 deletions(-) delete mode 100644 doc/heartbeat-ra/VIPcheck diff --git a/doc/heartbeat-ra/VIPcheck b/doc/heartbeat-ra/VIPcheck deleted file mode 100644 index 21cba307..00000000 --- a/doc/heartbeat-ra/VIPcheck +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh -# -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -# - -####################################################################### -# Initialization: - -. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs -#. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs - -####################################################################### - -meta_data() { - cat < - - -1.0 - - -This is a VIPcheck Resource Agent. - -VIPcheck resource agent - - - - -ping target VIP address. - -target ip - - - - - -repeat times - -repeat times - - - - - -wait times - -wait times - - - - - - - - - - - - -END -} - -####################################################################### - -VIPcheck_usage() { - cat < /dev/null 2>&1 - prc=$? - ocf_log debug "target_ip = $OCF_RESKEY_target_ip, count = $OCF_RESKEY_count, wait = $OCF_RESKEY_wait" - ocf_log debug "ping return code = $prc" - if [ $prc = 0 ]; then - # pingが通った-->ERROR - return $OCF_ERR_GENERIC - else - # pingが通らない --> 成功 - touch ${OCF_RESKEY_state} - return $OCF_SUCCESS - fi -} - -VIPcheck_stop() { - VIPcheck_monitor - if [ $? = $OCF_SUCCESS ]; then - rm ${OCF_RESKEY_state} - fi - return $OCF_SUCCESS -} - -VIPcheck_monitor() { - if [ -f ${OCF_RESKEY_state} ]; then - return $OCF_SUCCESS - fi - if false ; then - return $OCF_ERR_GENERIC - fi - return $OCF_NOT_RUNNING -} - -: ${OCF_RESKEY_wait=10} -: ${OCF_RESKEY_count=1} -: ${OCF_RESKEY_state=${HA_RSCTMP}/VIPcheck-${OCF_RESOURCE_INSTANCE}.state} - -case $__OCF_ACTION in -meta-data) meta_data - exit $OCF_SUCCESS - ;; -start) VIPcheck_start;; -stop) VIPcheck_stop;; -monitor) VIPcheck_monitor;; -usage|help) VIPcheck_usage - exit $OCF_SUCCESS - ;; -*) VIPcheck_usage - exit $OCF_ERR_UNIMPLEMENTED - ;; -esac -rc=$? -ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" -exit $rc - -- 2.11.0