Este contenido no está disponible en el idioma seleccionado.
Appendix A. OCF Return Codes
This appendix describes the OCF return codes and how they are interpreted by Pacemaker.
The first thing the cluster does when an agent returns a code is to check the return code against the expected result. If the result does not match the expected value, then the operation is considered to have failed, and recovery action is initiated.
For any invocation, resource agents must exit with a defined return code that informs the caller of the outcome of the invoked action.
There are three types of failure recovery, as described in Table A.1, “Types of Recovery Performed by the Cluster”.
Type | Description | Action Taken by the Cluster |
---|---|---|
soft
|
A transient error occurred.
|
Restart the resource or move it to a new location .
|
hard
|
A non-transient error that may be specific to the current node occurred.
|
Move the resource elsewhere and prevent it from being retried on the current node.
|
fatal
|
A non-transient error that will be common to all cluster nodes occurred (for example, a bad configuration was specified).
|
Stop the resource and prevent it from being started on any cluster node.
|
Table A.2, “OCF Return Codes” provides The OCF return codes and the type of recovery the cluster will initiate when a failure code is received. Note that even actions that return 0 (OCF alias
OCF_SUCCESS
) can be considered to have failed, if 0 was not the expected return value.
Return Code | OCF Label | Description | |||
---|---|---|---|---|---|
0
| OCF_SUCCESS
|
| |||
1
| OCF_ERR_GENERIC
|
| |||
2
| OCF_ERR_ARGS
|
| |||
3
| OCF_ERR_UNIMPLEMENTED
|
| |||
4
| OCF_ERR_PERM
|
| |||
5
| OCF_ERR_INSTALLED
|
| |||
6
| OCF_ERR_CONFIGURED
|
| |||
7
| OCF_NOT_RUNNING
|
| |||
8
| OCF_RUNNING_MASTER
|
| |||
9
| OCF_FAILED_MASTER
|
| |||
other
|
N/A
|
Custom error code.
|