⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 req_resource.in

📁 linux集群服务器软件代码包
💻 IN
字号:
#!/bin/sh##	This script is called to politely request that a resource be given up#	to us.##	At the end of $TIMEOUT, we take it anyway.##	It could be that we already have taken it, in which case it should#	do nothing.### set -xprefix=@prefix@exec_prefix=@exec_prefix@HA_DIR=@sysconfdir@/ha.d; export HA_DIR. $HA_DIR/shellfuncs##	This code is the "ask nicely" case for when we first start up a node.#	The case of the other node failing or being dead when we start up#	is handled by mach_down which invokes takegroup just like we do#	except it never asks for permission.##	The nice_failback = yes ($HA_NICEFAILBACK) case coordinates things#	so always know the other guy doesn't have the resources before we#	get here, so we don't need to ever wait in that case...##	If no one else is up, then we set HA_DONTASK in the environment.#	It is possible that the TIMEOUT case should be removed now...#	This is a failsafe case, but it's kind of a dangerous failsafe#	case...#TIMEOUT=1200RESOURCE=$1##	Do we already have this resource?#$HA_BIN/ResourceManager status $RESOURCE && exit 0##	Now give our ip-request-message...##		"ip-request"		Message type#		ip-address		IP address requested#						DENY if we won't/can't#case $HA_DEBUG in [123458789]*)	ha_log "debug: in $0 $*"		ha_log "debug: dont_ask: $HA_DONTASK nice_failback: $HA_NICEFAILBACK";;esac##	The nice failback case only takes over from dead machines...#case $HA_NICEFAILBACK in  yes)	HA_DONTASK=yes;;esacCMD=ip-requestcase $HA_DONTASK in  yes)	#	#	Pretend the current owner gave it up peacefully	#	ha_clustermsg <<-!MSG		t=$CMD-resp		dest=$HA_CURHOST		ipaddr=$RESOURCE		weown=yes		ok=OK!MSG	;;  *)	: "Ask Nicely ;-)"	ha_clustermsg <<-!MSG	t=$CMD	ipaddr=$RESOURCE!MSG	#	NOTE!	#	The original dangerous failsafe takeover of resources	#	has been disabled!!	exit 0  # Normally they will have already replied to us before we get here  # and we will have already taken things over.  This is to allow  # for the case that they somehow never tell us to go ahead...  # Heartbeat should kill us if it shuts down before we finish.  # For that to work we can't go into the background...	sleep $TIMEOUT	$HA_BIN/ResourceManager status "$RESOURCE" ||	$HA_BIN/ResourceManager takegroup "$RESOURCE"	;;esac

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -