Actions

You define the desired actions as sections inside the actions: section and give them unique names. Those names will be referenced later in the policies: section of the template.

Actions are defined with a section name, type and properties.

section name

Example: repair:

Type

The type: specifies the type of policy action:

  • type: dcm.policy.action.ReplaceResource
  • type: dcm.policy.action.RestartResource
  • type: dcm.policy.action.MarkResourceHealthy
  • type: dcm.policy.action.MarkResourceNonfunctional

Properties

The following properties are supported on the actions:

  • changeType: - The actual action to perform.
  • REPLACE - Delete and recreate the resource.
  • This is the default for the type dcm.policy.action.ReplaceResource.
  • RESTART - Reboots the resource (only applies to servers).
  • This is the default for the type dcm.policy.action.RestartResource.
  • LOG - just log the health check failure, do not perform any repair.

Example: changeType: REPLACE

Note

All of the changeType actions are affected by minInstances and maxInstances.


Note

It will be possible to change the changeType: value on the fly from the Dell Cloud Manager Console or API.

Example

    # Actions defines details of various actions that could be taken,
    actions:
      repair:                               # The repair action label is referenced in the policy in the actions[] statement   
        type: dcm.policy.action.ReplaceResource
        properties:
          changeType: REPLACE               # Replace the resource

      reboot:                               # The reboot action label is referenced in the policy in the actions[] statement
        type: dcm.policy.action.RestartResource
        properties:
          changeType: RESTART               # Reboot the server