Product SiteDocumentation Site

5.8. Setting Global Defaults for Operations

To set a default value for a operation option, simply add it to the op_defaults section with crm_attribute. Thus,
crm_attribute --type op_defaults --attr-name timeout --attr-value 20s
would default each operation's timeout to 20 seconds. If an operation's definition also includes a value for timeout, then that value would be used instead (for that operation only).

5.8.1. When Resources Take a Long Time to Start/Stop

There are a number of implicit operations that the cluster will always perform - start, stop and a non-recurring monitor operation (used at startup to check the resource isn't already active). If one of these is taking too long, then you can create an entry for them and simply specify a new value.
Example 5.8. An OCF resource with custom timeouts for its implicit actions

  <primitive id="Public-IP" class="ocf" type="IPaddr" provider="heartbeat">
     <op id="public-ip-startup" name="monitor" interval="0" timeout="90s"/>
     <op id="public-ip-start" name="start" interval="0" timeout="180s"/>
     <op id="public-ip-stop" name="stop" interval="0" timeout="15min"/>
    <instance_attributes id="params-public-ip">
       <nvpair id="public-ip-addr" name="ip" value=""/>