Product SiteDocumentation Site

5.7.2. Settaggio dei valori di default globali per le operazioni

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.7.2.1. Quando una risorsa impiega molto tempo per Avviarsi/Fermarsi

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.

Esempio 5.7. Una risorsa OCF on timeout personalizzato per le proprie azioni implicite

<primitive id="Public-IP" class="ocf" type="IPaddr" provider="heartbeat">
  <operations>
     <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"/>
  </operations>
  <instance_attributes id="params-public-ip">
     <nvpair id="public-ip-addr" name="ip" value="1.2.3.4"/>
  </instance_attributes>
</primitive>