pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
scheduler.h File Reference

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>
Include dependency graph for scheduler.h:
This graph shows which files directly or indirectly include this file:

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_tpcmk_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_tpcmk_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_tpcmk_find_node (const pcmk_scheduler_t *scheduler, const char *node_name)
 Find a node by name in scheduler data.
 

Detailed Description

Scheduler API.

Definition in file scheduler.h.

Typedef Documentation

◆ pcmk__scheduler_private_t

Definition at line 68 of file scheduler.h.

Enumeration Type Documentation

◆ 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 
Deprecated
Use pcmk_no_quorum_freeze instead
no_quorum_stop 
Deprecated
Use pcmk_no_quorum_stop instead
no_quorum_ignore 
Deprecated
Use pcmk_no_quorum_ignore instead
no_quorum_suicide 
Deprecated
Use pcmk_no_quorum_fence instead
no_quorum_demote 
Deprecated
Use pcmk_no_quorum_demote instead

Definition at line 38 of file scheduler.h.

Function Documentation

◆ pcmk_find_node()

pcmk_node_t * pcmk_find_node ( const pcmk_scheduler_t * scheduler,
const char * node_name )

Find a node by name in scheduler data.

Parameters
[in]schedulerScheduler data
[in]node_nameName of node to find
Returns
Node from scheduler data that matches node_name if any, otherwise NULL

Definition at line 282 of file scheduler.c.

◆ pcmk_free_scheduler()

void pcmk_free_scheduler ( pcmk_scheduler_t * scheduler)

Free scheduler data.

Parameters
[in,out]schedulerScheduler data to free

Definition at line 193 of file scheduler.c.

◆ pcmk_get_dc()

pcmk_node_t * pcmk_get_dc ( const pcmk_scheduler_t * scheduler)

Definition at line 212 of file scheduler.c.

◆ pcmk_get_no_quorum_policy()

enum pe_quorum_policy pcmk_get_no_quorum_policy ( const pcmk_scheduler_t * scheduler)

Definition at line 226 of file scheduler.c.

◆ pcmk_has_quorum()

bool pcmk_has_quorum ( const pcmk_scheduler_t * scheduler)

Definition at line 264 of file scheduler.c.

◆ pcmk_new_scheduler()

pcmk_scheduler_t * pcmk_new_scheduler ( void )

Create a new object to hold scheduler data.

Returns
New, initialized scheduler data, or NULL on memory error
Note
Only pcmk_scheduler_t objects created with this function (as opposed to statically declared or directly allocated) should be used with the functions in this library, to allow for future extensions to the data type. The caller is responsible for freeing the memory with pcmk_free_scheduler() when the instance is no longer needed.

Definition at line 32 of file scheduler.c.

◆ pcmk_reset_scheduler()

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

Parameters
[in,out]schedulerScheduler data to reset

Definition at line 87 of file scheduler.c.

◆ pcmk_set_scheduler_cib()

int pcmk_set_scheduler_cib ( pcmk_scheduler_t * scheduler,
xmlNode * cib )

Definition at line 246 of file scheduler.c.