pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Functions
status.c File Reference
#include <crm_internal.h>
#include <sys/param.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
#include <glib.h>
#include <crm/pengine/internal.h>
#include <pe_status_private.h>
Include dependency graph for status.c:

Go to the source code of this file.

Functions

pcmk_scheduler_tpe_new_working_set (void)
 Create a new object to hold scheduler data. More...
 
void pe_free_working_set (pcmk_scheduler_t *scheduler)
 Free scheduler data. More...
 
gboolean cluster_status (pcmk_scheduler_t *scheduler)
 
void cleanup_calculations (pcmk_scheduler_t *scheduler)
 Reset scheduler data to defaults without freeing it or constraints. More...
 
void pe_reset_working_set (pcmk_scheduler_t *scheduler)
 Reset scheduler data to default state without freeing it. More...
 
void set_working_set_defaults (pcmk_scheduler_t *scheduler)
 
pcmk_resource_tpe_find_resource (GList *rsc_list, const char *id)
 
pcmk_resource_tpe_find_resource_with_flags (GList *rsc_list, const char *id, enum pe_find flags)
 
pcmk_node_tpe_find_node_any (const GList *nodes, const char *id, const char *uname)
 Find a node by name or ID in a list of nodes. More...
 
pcmk_node_tpe_find_node_id (const GList *nodes, const char *id)
 Find a node by ID in a list of nodes. More...
 
pcmk_node_tpe_find_node (const GList *nodes, const char *node_name)
 Find a node by name in a list of nodes. More...
 

Function Documentation

◆ cleanup_calculations()

void cleanup_calculations ( pcmk_scheduler_t scheduler)

Reset scheduler data to defaults without freeing it or constraints.

Parameters
[in,out]schedulerScheduler data to reset
Deprecated:
This function is deprecated as part of the API; pe_reset_working_set() should be used instead.

Definition at line 279 of file status.c.

◆ cluster_status()

gboolean cluster_status ( pcmk_scheduler_t scheduler)

Definition at line 71 of file status.c.

◆ pe_find_node()

pcmk_node_t* pe_find_node ( const GList *  nodes,
const char *  node_name 
)

Find a node by name in a list of nodes.

Parameters
[in]nodesList of nodes (as pcmk_node_t*)
[in]node_nameName of node to find
Returns
Node from nodes that matches node_name if any, otherwise NULL

Definition at line 473 of file status.c.

◆ pe_find_node_any()

pcmk_node_t* pe_find_node_any ( const GList *  nodes,
const char *  id,
const char *  uname 
)

Find a node by name or ID in a list of nodes.

Parameters
[in]nodesList of nodes (as pcmk_node_t*)
[in]idIf not NULL, ID of node to find
[in]node_nameIf not NULL, name of node to find
Returns
Node from nodes that matches id if any, otherwise node from nodes that matches uname if any, otherwise NULL

Definition at line 426 of file status.c.

◆ pe_find_node_id()

pcmk_node_t* pe_find_node_id ( const GList *  nodes,
const char *  id 
)

Find a node by ID in a list of nodes.

Parameters
[in]nodesList of nodes (as pcmk_node_t*)
[in]idID of node to find
Returns
Node from nodes that matches id if any, otherwise NULL

Definition at line 448 of file status.c.

◆ pe_find_resource()

pcmk_resource_t* pe_find_resource ( GList *  rsc_list,
const char *  id 
)

Definition at line 391 of file status.c.

◆ pe_find_resource_with_flags()

pcmk_resource_t* pe_find_resource_with_flags ( GList *  rsc_list,
const char *  id,
enum pe_find  flags 
)

Definition at line 397 of file status.c.

◆ pe_free_working_set()

void pe_free_working_set ( pcmk_scheduler_t scheduler)

Free scheduler data.

Parameters
[in,out]schedulerScheduler data to free

Definition at line 50 of file status.c.

◆ pe_new_working_set()

pcmk_scheduler_t* pe_new_working_set ( void  )

Create a new object to hold scheduler data.

Returns
New, initialized scheduler data on success, else NULL (and set errno)
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 pe_free_working_set() when the instance is no longer needed.

Definition at line 34 of file status.c.

◆ pe_reset_working_set()

void pe_reset_working_set ( pcmk_scheduler_t scheduler)

Reset scheduler data to default state without freeing it.

Parameters
[in,out]schedulerScheduler data to reset

Definition at line 338 of file status.c.

◆ set_working_set_defaults()

void set_working_set_defaults ( pcmk_scheduler_t scheduler)

Definition at line 368 of file status.c.