Product SiteDocumentation Site

6.3. Specifying in which Order Resources Should Start/Stop

The way to specify the order in which resources should start is by creating rsc_order constraints.

Table 6.2. Properties of an Ordering Constraint

Field Description
id
A unique name for the constraint
first
The name of a resource that must be started before the then resource is allowed to.
then
The name of a resource. This resource will start after the first resource.
kind
How to enforce the constraint. (Since 1.1.2)
* Optional - Just a suggestion. Only applies if both resources are starting/stopping.
* Mandatory - Always. If first is stopping or cannot be started, then must be stopped.
* Serialize - Ensure that no two stop/start actions occur concurrently for a set of resources.
symmetrical
If true, which is the default, stop the resources in the reverse order. Default value: true

6.3.1. Mandatory Ordering

When the then resource cannot run without the first resource being active, one should use mandatory constraints. To specify a constraint is mandatory, use scores greater than zero. This will ensure that the then resource will react when the first resource changes state.
  • If the first resource was running and is stopped, the then resource will also be stopped (if it is running).
  • If the first resource was not running and cannot be started, the then resource will be stopped (if it is running).
  • If the first resource is (re)started while the then resource is running, the then resource will be stopped and restarted.