This file is indexed.

/usr/lib/ocf/resource.d/pacemaker/pingd is in pacemaker-resource-agents 1.1.18-0ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#!/bin/sh
#
#
#	pingd OCF Resource Agent
#	Records (in the CIB) the current number of ping nodes a 
#	   cluster node can connect to.
#
# Copyright (c) 2006 Andrew Beekhof
#                    All Rights Reserved.
#
# 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_FUNCTIONS=${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs}
. ${OCF_FUNCTIONS}
: ${__OCF_ACTION=$1}

: ${OCF_RESKEY_name:="pingd"}
: ${OCF_RESKEY_interval:="1"}
: ${OCF_RESKEY_CRM_meta_interval:=0}

upgrade1="This agent (ocf:pacemaker:pingd) has been replaced by the more reliable ocf:pacemaker:ping."
upgrade2="Attempting automated conversion, run 'crm ra info ocf:pacemaker:ping' for all configuration options"
upgrade3="You will need to remove the existing resource and replace it with one that uses 'ocf:pacemaker:ping' directly"

case $__OCF_ACTION in
    start|monitor)
	if [ "x" != "x$OCF_RESKEY_host_list" ]; then
	    ocf_log err "$upgrade1"
	    ocf_log err "$upgrade2"
	    ocf_log err "Automatic conversion to ocf:pacemaker:ping failed: no hosts were configured to check for connectivity"
	    ocf_log err "$upgrade3"
	    exit $OCF_ERR_ARGS
	fi

	recurring=`crm configure show $OCF_RESOURCE_INSTANCE | grep "op monitor.*interval=\"[1-9]" | sed s/.*interval=// | awk -F\" '{print $2}' | sed s/.*interval=// | awk -F\" '{print $2}' | sort | head -n 1`

	if [ -z $recurring ]; then
	    ocf_log err "$upgrade1"
	    ocf_log err "$upgrade2"
	    ocf_log err "Automatic conversion to ocf:pacemaker:ping failed: no monitor operation configured"
	    ocf_log err "Without an explicit monitor operation for '$OCF_RESOURCE_INSTANCE', connectivity changes will not be noticed"
	    ocf_log err "Preventing startup to ensure the issue is addressed before it matters"
	    exit $OCF_ERR_ARGS
	fi
	
	if [ $OCF_RESKEY_CRM_meta_interval = 0 ]; then
	    ocf_log warn "$upgrade1"
	    ocf_log warn "$upgrade2"
	    if [ $recurring != $OCF_RESKEY_interval ]; then
		ocf_log warn "Your monitor operation happens every $recurring, which means that the $OCF_RESKEY_name attribute will be updated with a different frequency than the previously configured ( $OCF_RESKEY_interval )"
		ocf_log warn "Either change the monitor interval to match or, ideally, switch to the ocf:pacemaker:ping agent and avoid all this compatibility nonsense."
	    fi
	fi
	;;
    meta-data)
	cat <<END
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="pingd" version="1.0">
<version>1.0</version>
<longdesc lang="en">
This agent (ocf:pacemaker:pingd) has been replaced by the more reliable ocf:pacemaker:ping.
It records (in the CIB) the current number of ping nodes (specified in the 'host_list' parameter) a cluster node can connect to.
</longdesc>
<shortdesc lang="en">pingd resource agent</shortdesc>

<parameters>

<parameter name="pidfile" unique="0">
<longdesc lang="en">PID file</longdesc>
<shortdesc lang="en">PID file</shortdesc>
<content type="string" default="${HA_VARRUN%%1}/pingd-${OCF_RESOURCE_INSTANCE}" />
</parameter>


<parameter name="user" unique="0">
<longdesc lang="en">
The user we want to run pingd as
</longdesc>
<shortdesc lang="en">The user we want to run pingd as</shortdesc>
<content type="string" default="root" />
</parameter>

<parameter name="dampen" unique="0">
<longdesc lang="en">
The time to wait (dampening) further changes occur
</longdesc>
<shortdesc lang="en">Dampening interval</shortdesc>
<content type="integer" default="5s"/>
</parameter>

<parameter name="set" unique="0">
<longdesc lang="en">
The name of the instance_attributes set to place the value in.  Rarely needs to be specified.
</longdesc>
<shortdesc lang="en">Set name</shortdesc>
<content type="string" default=""/>
</parameter>

<parameter name="name" unique="0">
<longdesc lang="en">
The name of the attributes to set.  This is the name to be used in the constraints.
</longdesc>
<shortdesc lang="en">Attribute name</shortdesc>
<content type="string" default="pingd"/>
</parameter>

<parameter name="section" unique="0">
<longdesc lang="en">
The section place the value in.  Rarely needs to be specified.
</longdesc>
<shortdesc lang="en">Section name</shortdesc>
<content type="string" default=""/>
</parameter>

<parameter name="multiplier" unique="0">
<longdesc lang="en">
The number by which to multiply the number of connected ping nodes by
</longdesc>
<shortdesc lang="en">Value multiplier</shortdesc>
<content type="integer" default=""/>
</parameter>

<parameter name="host_list" unique="0">
<longdesc lang="en">
The list of ping nodes to count.  Defaults to all configured ping nodes.  Rarely needs to be specified.
</longdesc>
<shortdesc lang="en">Host list</shortdesc>
<content type="string" default=""/>
</parameter>

<parameter name="interval" unique="0">
<longdesc lang="en">
How often, in seconds, to check for node liveliness
</longdesc>
<shortdesc lang="en">ping interval in seconds</shortdesc>
<content type="integer" default="1"/>
</parameter>

<parameter name="attempts" unique="0">
<longdesc lang="en">
Number of ping attempts, per host, before declaring it dead
</longdesc>
<shortdesc lang="en">no. of ping attempts</shortdesc>
<content type="integer" default="2"/>
</parameter>

<parameter name="timeout" unique="0">
<longdesc lang="en">
How long, in seconds, to wait before declaring a ping lost
</longdesc>
<shortdesc lang="en">ping timeout in seconds</shortdesc>
<content type="integer" default="2"/>
</parameter>

<parameter name="options" unique="0">
<longdesc lang="en">
A catch all for any other options that need to be passed to pingd.
</longdesc>
<shortdesc lang="en">Extra Options</shortdesc>
<content type="string" default=""/>
</parameter>

</parameters>

<actions>
<action name="start"   timeout="90" />
<action name="stop"    timeout="100" />
<action name="monitor" depth="0"  timeout="20" interval="10" start-delay="1m" />
<action name="meta-data"  timeout="5" />
<action name="validate-all"  timeout="30" />
</actions>
</resource-agent>
END
	exit $OCF_SUCCESS
	;;
esac

${OCF_ROOT}/resource.d/pacemaker/ping $1
exit $?