#!@BASH_SHELL@ # # Dummy OCF script for resource group # # # Copyright (C) 1997-2003 Sistina Software, Inc. All rights reserved. # Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Grab nfs lock tricks if available export NFS_TRICKS=1 if [ -f "$(dirname $0)/svclib_nfslock" ]; then . $(dirname $0)/svclib_nfslock NFS_TRICKS=0 fi meta_data() { cat < 1.0 This defines a collection of resources, known as a resource group or cluster service. Defines a service (resource group). This is the name of the resource group. Name. Failover domains define lists of cluster members to try in the event that a resource group fails. Failover domain. If set to yes, this resource group will automatically be started after the cluster forms a quorum. If set to no, this resource group will start in the 'disabled' state after the cluster forms a quorum. Automatic start after quorum formation If set, this resource group will only relocate to nodes which have no other resource groups running in the event of a failure. If no empty nodes are available, this resource group will not be restarted after a failure. Additionally, resource groups will not automatically relocate to the node running this resource group. This option can be overridden by manual start and/or relocate operations. Exclusive service. Enable NFS lock workarounds. When used with a compatible HA-callout program like clunfslock, this could be used to provide NFS lock failover, but at significant cost to other services on the machine. This requires a compatible version of nfs-utils and manual configuration of rpc.statd; see 'man rpc.statd' to see if your version supports the -H parameter. Enable NFS lock workarounds. On systems with large numbers of exports, a performance problem in the exportfs command can cause inordinately long status check times for services with lots of mounted NFS clients. This occurs because exportfs does DNS queries on all clients in the export list. Setting this option to '1' will enable caching of the export list returned from the exportfs command on a per-service basis. The cache will last for 30 seconds before expiring instead of being generated each time an nfsclient resource is called. Enable exportfs list caching (performance). This currently has three possible options: "restart" tries to restart failed parts of this resource group locally before attempting to relocate (default); "relocate" does not bother trying to restart the service locally; "disable" disables the resource group if any component fails. Note that any resource with a valid "recover" operation which can be recovered without a restart will be. Failure recovery policy (restart, relocate, or disable). Service dependency; will not start without the specified service running. Top-level service this depends on, in service:name format. Service dependency mode. hard - This service is stopped/started if its dependency is stopped/started soft - This service only depends on the other service for initial startip. If the other service stops, this service is not stopped. Service dependency mode (soft or hard). Maximum restarts for this service. Maximum restarts for this service. Restart expiration time. A restart is forgotten after this time. When combined with the max_restarts option, this lets administrators specify a threshold for when to fail over services. If max_restarts is exceeded in this given expiration time, the service is relocated instead of restarted again. Restart expiration time; amount of time before a restart is forgotten. Priority for the service. In a failover scenario, this indicates the ordering of the service (1 is processed first, 2 is processed second, etc.). This overrides the order presented in cluster.conf. This option only has an effect if central processing within rgmanager is turned on. Service priority. EOT } # # A Resource group is abstract, but the OCF RA API doesn't allow for abstract # resources, so here it is. # case $1 in start) # # XXX If this is set, we kill lockd. If there is no # child IP address, then clients will NOT get the reclaim # notification. # if [ $NFS_TRICKS -eq 0 ]; then if [ "$OCF_RESKEY_nfslock" = "yes" ] || \ [ "$OCF_RESKEY_nfslock" = "1" ]; then pkill -KILL -x lockd fi fi exit 0 ;; stop) exit 0 ;; recover|restart) exit 0 ;; status|monitor) exit 0 ;; reload) exit 0 ;; meta-data) meta_data exit 0 ;; validate-all) exit 0 ;; reconfig) exit 0 ;; *) exit 0 ;; esac