pacemaker
2.1.6-802a72226b
Scalable High-Availability cluster resource manager
|
Go to the source code of this file.
Enumerations | |
enum | pcmk__fence_history { pcmk__fence_history_none, pcmk__fence_history_reduced, pcmk__fence_history_full } |
Control how much of the fencing history is output. More... | |
Functions | |
int | pcmk__request_fencing (stonith_t *st, const char *target, const char *action, const char *name, unsigned int timeout, unsigned int tolerance, int delay, char **reason) |
Ask the cluster to perform fencing. More... | |
int | pcmk__fence_history (pcmk__output_t *out, stonith_t *st, const char *target, unsigned int timeout, int verbose, bool broadcast, bool cleanup) |
List the fencing operations that have occurred for a specific node. More... | |
int | pcmk__fence_installed (pcmk__output_t *out, stonith_t *st, unsigned int timeout) |
List all installed fence agents. More... | |
int | pcmk__fence_last (pcmk__output_t *out, const char *target, bool as_nodeid) |
When was a device last fenced? More... | |
int | pcmk__fence_list_targets (pcmk__output_t *out, stonith_t *st, const char *device_id, unsigned int timeout) |
List nodes that can be fenced. More... | |
int | pcmk__fence_metadata (pcmk__output_t *out, stonith_t *st, const char *agent, unsigned int timeout) |
Get metadata for a fence agent. More... | |
int | pcmk__fence_registered (pcmk__output_t *out, stonith_t *st, const char *target, unsigned int timeout) |
List registered fence devices. More... | |
int | pcmk__fence_register_level (stonith_t *st, const char *target, int fence_level, const stonith_key_value_t *devices) |
Register a fencing level for a specific node, node regex, or attribute. More... | |
int | pcmk__fence_unregister_level (stonith_t *st, const char *target, int fence_level) |
Unregister a fencing level for specific node, node regex, or attribute. More... | |
int | pcmk__fence_validate (pcmk__output_t *out, stonith_t *st, const char *agent, const char *id, const stonith_key_value_t *params, unsigned int timeout) |
Validate a fence device configuration. More... | |
int | pcmk__get_fencing_history (stonith_t *st, stonith_history_t **stonith_history, enum pcmk__fence_history fence_history) |
Fetch fencing history, optionally reducing it. More... | |
enum pcmk__fence_history |
Control how much of the fencing history is output.
Enumerator | |
---|---|
pcmk__fence_history_none | |
pcmk__fence_history_reduced | |
pcmk__fence_history_full |
Definition at line 18 of file pcmki_fence.h.
int pcmk__fence_history | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
const char * | target, | ||
unsigned int | timeout, | ||
int | verbose, | ||
bool | broadcast, | ||
bool | cleanup | ||
) |
List the fencing operations that have occurred for a specific node.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | target | The node to get history for |
[in] | timeout | How long to wait for operation to complete (in ms) |
[in] | verbose | Include additional output |
[in] | broadcast | Gather fencing history from all nodes |
[in] | cleanup | Clean up fencing history after listing |
Definition at line 231 of file pcmk_fence.c.
int pcmk__fence_installed | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
unsigned int | timeout | ||
) |
List all installed fence agents.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | timeout | How long to wait for the operation to complete (in ms) |
Definition at line 324 of file pcmk_fence.c.
int pcmk__fence_last | ( | pcmk__output_t * | out, |
const char * | target, | ||
bool | as_nodeid | ||
) |
When was a device last fenced?
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure. |
[in] | target | The node that was fenced. |
[in] | as_nodeid |
Definition at line 366 of file pcmk_fence.c.
int pcmk__fence_list_targets | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
const char * | device_id, | ||
unsigned int | timeout | ||
) |
List nodes that can be fenced.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | device_id | Resource ID of fence device to check |
[in] | timeout | How long to wait for operation to complete (in ms) |
Definition at line 404 of file pcmk_fence.c.
int pcmk__fence_metadata | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
const char * | agent, | ||
unsigned int | timeout | ||
) |
Get metadata for a fence agent.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | agent | The fence agent to get metadata for |
[in] | timeout | How long to wait for the operation to complete (in ms) |
Definition at line 451 of file pcmk_fence.c.
int pcmk__fence_register_level | ( | stonith_t * | st, |
const char * | target, | ||
int | fence_level, | ||
const stonith_key_value_t * | devices | ||
) |
Register a fencing level for a specific node, node regex, or attribute.
target
can take three different forms:
target
is an attribute.target
is a node regex.target
is a node name.[in,out] | st | A connection to the fencer API |
[in] | target | The object to register a fencing level for |
[in] | fence_level | Index number of level to add |
[in] | devices | Devices to use in level |
Definition at line 537 of file pcmk_fence.c.
int pcmk__fence_registered | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
const char * | target, | ||
unsigned int | timeout | ||
) |
List registered fence devices.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | target | If not NULL, return only devices that can fence this |
[in] | timeout | How long to wait for the operation to complete (in ms) |
Definition at line 489 of file pcmk_fence.c.
int pcmk__fence_unregister_level | ( | stonith_t * | st, |
const char * | target, | ||
int | fence_level | ||
) |
Unregister a fencing level for specific node, node regex, or attribute.
target
can take three different forms:
target
is an attribute.target
is a node regex.target
is a node name.[in,out] | st | A connection to the fencer API |
[in] | target | The object to unregister a fencing level for |
[in] | fence_level | Index number of level to remove |
Definition at line 553 of file pcmk_fence.c.
int pcmk__fence_validate | ( | pcmk__output_t * | out, |
stonith_t * | st, | ||
const char * | agent, | ||
const char * | id, | ||
const stonith_key_value_t * | params, | ||
unsigned int | timeout | ||
) |
Validate a fence device configuration.
out
should be initialized with pcmk__output_new() before calling this function and destroyed with out->finish and pcmk__output_free() before reusing it with any other functions in this library.[in,out] | out | The output functions structure |
[in,out] | st | A connection to the fencer API |
[in] | agent | The agent to validate (for example, "fence_xvm") |
[in] | id | Fence device ID (may be NULL) |
[in] | params | Fence device configuration parameters |
[in] | timeout | How long to wait for the operation to complete (in ms) |
Definition at line 567 of file pcmk_fence.c.
int pcmk__get_fencing_history | ( | stonith_t * | st, |
stonith_history_t ** | stonith_history, | ||
enum pcmk__fence_history | fence_history | ||
) |
Fetch fencing history, optionally reducing it.
[in,out] | st | A connection to the fencer API |
[out] | stonith_history | Destination for storing the history |
[in] | fence_history | How much of the fencing history to display |
Definition at line 604 of file pcmk_fence.c.
int pcmk__request_fencing | ( | stonith_t * | st, |
const char * | target, | ||
const char * | action, | ||
const char * | name, | ||
unsigned int | timeout, | ||
unsigned int | tolerance, | ||
int | delay, | ||
char ** | reason | ||
) |
Ask the cluster to perform fencing.
[in,out] | st | A connection to the fencer API |
[in] | target | The node that should be fenced |
[in] | action | The fencing action (on, off, reboot) to perform |
[in] | name | Who requested the fence action? |
[in] | timeout | How long to wait for operation to complete (in ms) |
[in] | tolerance | If a successful action for target happened within this many milliseconds, return success without performing the action again |
[in] | delay | Apply this delay (in milliseconds) before initiating fencing action (a value of -1 applies no delay and disables any fencing delay from pcmk_delay_base and pcmk_delay_max) |
[out] | reason | If not NULL, where to put descriptive failure reason |
reason
is not NULL, the caller is responsible for freeing its returned value. Definition at line 184 of file pcmk_fence.c.