pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
Functions
complex.c File Reference
#include <crm_internal.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/scheduler_internal.h>
#include "pe_status_private.h"
Include dependency graph for complex.c:

Go to the source code of this file.

Functions

void populate_hash (xmlNode *nvpair_list, GHashTable *hash, const char **attrs, int attrs_length)
 
void get_meta_attributes (GHashTable *meta_hash, pcmk_resource_t *rsc, pcmk_node_t *node, pcmk_scheduler_t *scheduler)
 
void get_rsc_attributes (GHashTable *instance_attrs, const pcmk_resource_t *rsc, const pcmk_node_t *node, pcmk_scheduler_t *scheduler)
 Get final values of a resource's instance attributes. More...
 
GHashTable * pe_rsc_params (pcmk_resource_t *rsc, const pcmk_node_t *node, pcmk_scheduler_t *scheduler)
 Get a table of resource parameters. More...
 
int pe__unpack_resource (xmlNode *xml_obj, pcmk_resource_t **rsc, pcmk_resource_t *parent, pcmk_scheduler_t *scheduler)
 
gboolean is_parent (pcmk_resource_t *child, pcmk_resource_t *rsc)
 
pcmk_resource_tuber_parent (pcmk_resource_t *rsc)
 
const pcmk_resource_tpe__const_top_resource (const pcmk_resource_t *rsc, bool include_bundle)
 
void common_free (pcmk_resource_t *rsc)
 
bool pe__count_active_node (const pcmk_resource_t *rsc, pcmk_node_t *node, pcmk_node_t **active, unsigned int *count_all, unsigned int *count_clean)
 
pcmk_node_tpe__find_active_requires (const pcmk_resource_t *rsc, unsigned int *count)
 
void pe__count_common (pcmk_resource_t *rsc)
 
void pe__set_next_role (pcmk_resource_t *rsc, enum rsc_role_e role, const char *why)
 

Function Documentation

◆ common_free()

void common_free ( pcmk_resource_t rsc)

Definition at line 1060 of file complex.c.

◆ get_meta_attributes()

void get_meta_attributes ( GHashTable *  meta_hash,
pcmk_resource_t rsc,
pcmk_node_t node,
pcmk_scheduler_t scheduler 
)

Definition at line 175 of file complex.c.

◆ get_rsc_attributes()

void get_rsc_attributes ( GHashTable *  instance_attrs,
const pcmk_resource_t rsc,
const pcmk_node_t node,
pcmk_scheduler_t scheduler 
)

Get final values of a resource's instance attributes.

Parameters
[in,out]instance_attrsWhere to store the instance attributes
[in]rscResource to get instance attributes for
[in]nodeIf not NULL, evaluate rules for this node
[in,out]schedulerScheduler data

Definition at line 236 of file complex.c.

◆ is_parent()

gboolean is_parent ( pcmk_resource_t child,
pcmk_resource_t rsc 
)

Definition at line 1000 of file complex.c.

◆ pe__const_top_resource()

const pcmk_resource_t* pe__const_top_resource ( const pcmk_resource_t rsc,
bool  include_bundle 
)

Definition at line 1043 of file complex.c.

◆ pe__count_active_node()

bool pe__count_active_node ( const pcmk_resource_t rsc,
pcmk_node_t node,
pcmk_node_t **  active,
unsigned int *  count_all,
unsigned int *  count_clean 
)

Definition at line 1134 of file complex.c.

◆ pe__count_common()

void pe__count_common ( pcmk_resource_t rsc)

Definition at line 1234 of file complex.c.

◆ pe__find_active_requires()

pcmk_node_t* pe__find_active_requires ( const pcmk_resource_t rsc,
unsigned int *  count 
)

Definition at line 1217 of file complex.c.

◆ pe__set_next_role()

void pe__set_next_role ( pcmk_resource_t rsc,
enum rsc_role_e  role,
const char *  why 
)

Definition at line 1265 of file complex.c.

◆ pe__unpack_resource()

int pe__unpack_resource ( xmlNode *  xml_obj,
pcmk_resource_t **  rsc,
pcmk_resource_t parent,
pcmk_scheduler_t scheduler 
)

Definition at line 700 of file complex.c.

◆ pe_rsc_params()

GHashTable* pe_rsc_params ( pcmk_resource_t rsc,
const pcmk_node_t node,
pcmk_scheduler_t scheduler 
)

Get a table of resource parameters.

Parameters
[in,out]rscResource to query
[in]nodeNode for evaluating rules (NULL for defaults)
[in,out]schedulerScheduler data
Returns
Hash table containing resource parameter names and values (or NULL if rsc or scheduler is NULL)
Note
The returned table will be destroyed when the resource is freed, so callers should not destroy it.

Definition at line 476 of file complex.c.

◆ populate_hash()

void populate_hash ( xmlNode *  nvpair_list,
GHashTable *  hash,
const char **  attrs,
int  attrs_length 
)

◆ uber_parent()

pcmk_resource_t* uber_parent ( pcmk_resource_t rsc)

Definition at line 1017 of file complex.c.