![]() |
pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
|
Scheduler API. More...
#include <sys/types.h>
#include <libxml/tree.h>
#include <glib.h>
#include <crm/common/iso8601.h>
#include <crm/common/actions.h>
#include <crm/common/nodes.h>
#include <crm/common/resources.h>
#include <crm/common/roles.h>
#include <crm/common/rules.h>
#include <crm/common/scheduler_types.h>
Go to the source code of this file.
Data Structures | |
struct | pcmk__scheduler |
Typedefs | |
typedef struct pcmk__scheduler_private | pcmk__scheduler_private_t |
Enumerations | |
enum | pe_quorum_policy { pcmk_no_quorum_freeze , pcmk_no_quorum_stop , pcmk_no_quorum_ignore , pcmk_no_quorum_fence , pcmk_no_quorum_demote , no_quorum_freeze = pcmk_no_quorum_freeze , no_quorum_stop = pcmk_no_quorum_stop , no_quorum_ignore = pcmk_no_quorum_ignore , no_quorum_suicide = pcmk_no_quorum_fence , no_quorum_demote = pcmk_no_quorum_demote } |
Possible responses to loss of quorum. More... | |
Functions | |
pcmk_scheduler_t * | pcmk_new_scheduler (void) |
Create a new object to hold scheduler data. | |
void | pcmk_reset_scheduler (pcmk_scheduler_t *scheduler) |
Reset scheduler data to defaults. | |
void | pcmk_free_scheduler (pcmk_scheduler_t *scheduler) |
Free scheduler data. | |
pcmk_node_t * | pcmk_get_dc (const pcmk_scheduler_t *scheduler) |
enum pe_quorum_policy | pcmk_get_no_quorum_policy (const pcmk_scheduler_t *scheduler) |
int | pcmk_set_scheduler_cib (pcmk_scheduler_t *scheduler, xmlNode *cib) |
bool | pcmk_has_quorum (const pcmk_scheduler_t *scheduler) |
pcmk_node_t * | pcmk_find_node (const pcmk_scheduler_t *scheduler, const char *node_name) |
Find a node by name in scheduler data. | |
Scheduler API.
Definition in file scheduler.h.
typedef struct pcmk__scheduler_private pcmk__scheduler_private_t |
Definition at line 68 of file scheduler.h.
enum pe_quorum_policy |
Possible responses to loss of quorum.
Enumerator | |
---|---|
pcmk_no_quorum_freeze | Do not recover resources from outside partition. |
pcmk_no_quorum_stop | Stop all resources in partition. |
pcmk_no_quorum_ignore | Act as if partition still holds quorum. |
pcmk_no_quorum_fence | Fence all nodes in partition. |
pcmk_no_quorum_demote | Demote promotable resources and stop all others. |
no_quorum_freeze |
|
no_quorum_stop |
|
no_quorum_ignore |
|
no_quorum_suicide |
|
no_quorum_demote |
|
Definition at line 38 of file scheduler.h.
pcmk_node_t * pcmk_find_node | ( | const pcmk_scheduler_t * | scheduler, |
const char * | node_name ) |
Find a node by name in scheduler data.
[in] | scheduler | Scheduler data |
[in] | node_name | Name of node to find |
node_name
if any, otherwise NULL Definition at line 282 of file scheduler.c.
void pcmk_free_scheduler | ( | pcmk_scheduler_t * | scheduler | ) |
Free scheduler data.
[in,out] | scheduler | Scheduler data to free |
Definition at line 193 of file scheduler.c.
pcmk_node_t * pcmk_get_dc | ( | const pcmk_scheduler_t * | scheduler | ) |
Definition at line 212 of file scheduler.c.
enum pe_quorum_policy pcmk_get_no_quorum_policy | ( | const pcmk_scheduler_t * | scheduler | ) |
Definition at line 226 of file scheduler.c.
bool pcmk_has_quorum | ( | const pcmk_scheduler_t * | scheduler | ) |
Definition at line 264 of file scheduler.c.
pcmk_scheduler_t * pcmk_new_scheduler | ( | void | ) |
Create a new object to hold scheduler data.
Definition at line 32 of file scheduler.c.
void pcmk_reset_scheduler | ( | pcmk_scheduler_t * | scheduler | ) |
Reset scheduler data to defaults.
Free scheduler data except the local node name and output object, and reset all other values to defaults, so the data is suitable for rerunning status
[in,out] | scheduler | Scheduler data to reset |
Definition at line 87 of file scheduler.c.
int pcmk_set_scheduler_cib | ( | pcmk_scheduler_t * | scheduler, |
xmlNode * | cib ) |
Definition at line 246 of file scheduler.c.