Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions heartbeat/IPaddr2
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ IPADDR2_CIP_IPTABLES=$IPTABLES
#######################################################################

meta_data() {
local reloadable_attr=""
local reload_action=""
ocf_version_cmp "${OCF_RESKEY_crm_feature_set:-3.10.0}" "3.10.0"
local res=$?
if [ $res -eq 0 ] || [ $res -eq 2 ]; then
reloadable_attr=' reloadable="1"'
reload_action='<action name="reload" timeout="20s" />'
fi
cat <<END
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
Expand Down Expand Up @@ -471,13 +479,25 @@ Consider the resource failed if the interface has status DOWN or LOWERLAYERDOWN.
<shortdesc lang="en">Consider the resource failed if the interface has status DOWN or LOWERLAYERDOWN</shortdesc>
<content type="string" default="${OCF_RESKEY_check_link_status_default}"/>
</parameter>

<parameter name="trace_ra"${reloadable_attr}>
<longdesc lang="en">
Set to 1 to turn on resource agent tracing (expect large output)
The trace output will be saved to trace_file, if set, or by default to
$HA_VARLIB/trace_ra/&lt;type&gt;/&lt;id&gt;.&lt;action&gt;.&lt;timestamp&gt;
e.g. $HA_VARLIB/trace_ra/oracle/db.start.2012-11-27.08:37:08
</longdesc>
<shortdesc lang="en">Set to 1 to turn on resource agent tracing (expect large output)</shortdesc>
<content type="boolean"/>
</parameter>
</parameters>

<actions>
<action name="start" timeout="20s" />
<action name="stop" timeout="20s" />
<action name="status" depth="0" timeout="20s" interval="10s" />
<action name="monitor" depth="0" timeout="20s" interval="10s" />
${reload_action}
<action name="meta-data" timeout="5s" />
<action name="validate-all" timeout="20s" />
</actions>
Expand Down Expand Up @@ -1420,6 +1440,8 @@ status) ip_status=`ip_served`
;;
monitor) ip_monitor
;;
reload) exit $OCF_SUCCESS
;;
validate-all) ;;
*) ip_usage
exit $OCF_ERR_UNIMPLEMENTED
Expand Down
23 changes: 23 additions & 0 deletions heartbeat/anything
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@ anything_validate() {
}

anything_meta() {
local reloadable_attr=""
local reload_action=""
ocf_version_cmp "${OCF_RESKEY_crm_feature_set:-3.10.0}" "3.10.0"
local res=$?
if [ $res -eq 0 ] || [ $res -eq 2 ]; then
reloadable_attr=' reloadable="1"'
reload_action='<action name="reload" timeout="20s" />'
fi
cat <<END
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
Expand Down Expand Up @@ -308,11 +316,23 @@ before sending kill -SIGKILL. Defaults to 2/3 of the stop operation timeout.
<shortdesc lang="en">Seconds to wait after having sent SIGTERM before sending SIGKILL in stop operation</shortdesc>
<content type="string" default="${OCF_RESKEY_stop_timeout_default}"/>
</parameter>

<parameter name="trace_ra"${reloadable_attr}>
<longdesc lang="en">
Set to 1 to turn on resource agent tracing (expect large output)
The trace output will be saved to trace_file, if set, or by default to
$HA_VARLIB/trace_ra/&lt;type&gt;/&lt;id&gt;.&lt;action&gt;.&lt;timestamp&gt;
e.g. $HA_VARLIB/trace_ra/oracle/db.start.2012-11-27.08:37:08
</longdesc>
<shortdesc lang="en">Set to 1 to turn on resource agent tracing (expect large output)</shortdesc>
<content type="boolean"/>
</parameter>
</parameters>
<actions>
<action name="start" timeout="20s" />
<action name="stop" timeout="20s" />
<action name="monitor" depth="0" timeout="20s" interval="10s" />
${reload_action}
<action name="meta-data" timeout="5s" />
<action name="validate-all" timeout="5s" />
</actions>
Expand All @@ -334,6 +354,9 @@ case "$1" in
monitor)
anything_monitor
;;
reload)
exit $OCF_SUCCESS
;;
validate-all)
anything_validate
;;
Expand Down