pacemaker  1.1.24-3850484742
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions
status.h File Reference

Cluster status and scheduling. More...

#include <glib.h>
#include <stdbool.h>
#include <crm/common/iso8601.h>
#include <crm/pengine/common.h>
#include <crm/pengine/complex.h>
Include dependency graph for status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pe_working_set_s
 
struct  node_shared_s
 
struct  node_s
 
struct  resource_s
 
struct  pe_action_s
 
struct  ticket_s
 
struct  tag_s
 
struct  action_wrapper_s
 

Macros

#define pe_flag_have_quorum   0x00000001ULL
 
#define pe_flag_symmetric_cluster   0x00000002ULL
 
#define pe_flag_is_managed_default   0x00000004ULL
 
#define pe_flag_maintenance_mode   0x00000008ULL
 
#define pe_flag_stonith_enabled   0x00000010ULL
 
#define pe_flag_have_stonith_resource   0x00000020ULL
 
#define pe_flag_enable_unfencing   0x00000040ULL
 
#define pe_flag_concurrent_fencing   0x00000080ULL
 
#define pe_flag_stop_rsc_orphans   0x00000100ULL
 
#define pe_flag_stop_action_orphans   0x00000200ULL
 
#define pe_flag_stop_everything   0x00000400ULL
 
#define pe_flag_start_failure_fatal   0x00001000ULL
 
#define pe_flag_remove_after_stop   0x00002000ULL
 
#define pe_flag_startup_fencing   0x00004000ULL
 
#define pe_flag_startup_probes   0x00010000ULL
 
#define pe_flag_have_status   0x00020000ULL
 
#define pe_flag_have_remote_nodes   0x00040000ULL
 
#define pe_flag_quick_location   0x00100000ULL
 
#define pe_flag_sanitized   0x00200000ULL
 
#define pe_flag_stdout   0x00400000ULL
 
#define pe_flag_no_counts   0x00800000ULL
 Don't count total, disabled and blocked resource instances. More...
 
#define pe_flag_no_compat   0x01000000ULL
 
#define pe_rsc_orphan   0x00000001ULL
 
#define pe_rsc_managed   0x00000002ULL
 
#define pe_rsc_block   0x00000004ULL
 
#define pe_rsc_orphan_container_filler   0x00000008ULL
 
#define pe_rsc_notify   0x00000010ULL
 
#define pe_rsc_unique   0x00000020ULL
 
#define pe_rsc_fence_device   0x00000040ULL
 
#define pe_rsc_provisional   0x00000100ULL
 
#define pe_rsc_allocating   0x00000200ULL
 
#define pe_rsc_merging   0x00000400ULL
 
#define pe_rsc_munging   0x00000800ULL
 
#define pe_rsc_try_reload   0x00001000ULL
 
#define pe_rsc_reload   0x00002000ULL
 
#define pe_rsc_allow_remote_remotes   0x00004000ULL
 
#define pe_rsc_failed   0x00010000ULL
 
#define pe_rsc_shutdown   0x00020000ULL
 
#define pe_rsc_runnable   0x00040000ULL
 
#define pe_rsc_start_pending   0x00080000ULL
 
#define pe_rsc_starting   0x00100000ULL
 
#define pe_rsc_stopping   0x00200000ULL
 
#define pe_rsc_migrating   0x00400000ULL
 
#define pe_rsc_allow_migrate   0x00800000ULL
 
#define pe_rsc_failure_ignored   0x01000000ULL
 
#define pe_rsc_unexpectedly_running   0x02000000ULL
 
#define pe_rsc_maintenance   0x04000000ULL
 
#define pe_rsc_is_container   0x08000000ULL
 
#define pe_rsc_needs_quorum   0x10000000ULL
 
#define pe_rsc_needs_fencing   0x20000000ULL
 
#define pe_rsc_needs_unfencing   0x40000000ULL
 
#define pe_rsc_have_unfencing   0x80000000ULL
 

Typedefs

typedef struct node_s pe_node_t
 
typedef struct node_s node_t
 
typedef struct pe_action_s action_t
 
typedef struct pe_action_s pe_action_t
 
typedef struct resource_s resource_t
 
typedef struct ticket_s ticket_t
 
typedef struct resource_s pe_resource_t
 
typedef enum no_quorum_policy_e no_quorum_policy_t
 
typedef struct pe_working_set_s pe_working_set_t
 
typedef struct tag_s tag_t
 
typedef struct action_wrapper_s action_wrapper_t
 

Enumerations

enum  no_quorum_policy_e { no_quorum_freeze, no_quorum_stop, no_quorum_ignore, no_quorum_suicide }
 
enum  node_type { node_ping, node_member, node_remote }
 
enum  pe_restart { pe_restart_restart, pe_restart_ignore }
 
enum  pe_find {
  pe_find_renamed = 0x001, pe_find_anon = 0x002, pe_find_clone = 0x004, pe_find_current = 0x008,
  pe_find_inactive = 0x010, pe_find_any = 0x020
}
 
enum  pe_check_parameters { pe_check_last_failure, pe_check_active }
 
enum  pe_graph_flags { pe_graph_none = 0x00000, pe_graph_updated_first = 0x00001, pe_graph_updated_then = 0x00002, pe_graph_disable = 0x00004 }
 
enum  pe_action_flags {
  pe_action_pseudo = 0x00001, pe_action_runnable = 0x00002, pe_action_optional = 0x00004, pe_action_print_always = 0x00008,
  pe_action_have_node_attrs = 0x00010, pe_action_failure_is_fatal = 0x00020, pe_action_implied_by_stonith = 0x00040, pe_action_migrate_runnable = 0x00080,
  pe_action_dumped = 0x00100, pe_action_processed = 0x00200, pe_action_clear = 0x00400, pe_action_dangle = 0x00800,
  pe_action_requires_any = 0x01000, pe_action_reschedule = 0x02000, pe_action_tracking = 0x04000
}
 
enum  pe_link_state { pe_link_not_dumped, pe_link_dumped, pe_link_dup }
 
enum  pe_discover_e { pe_discover_always = 0, pe_discover_never, pe_discover_exclusive }
 
enum  pe_ordering {
  pe_order_none = 0x0, pe_order_optional = 0x1, pe_order_apply_first_non_migratable = 0x2, pe_order_implies_first = 0x10,
  pe_order_implies_then = 0x20, pe_order_implies_first_master = 0x40, pe_order_implies_first_migratable = 0x80, pe_order_runnable_left = 0x100,
  pe_order_pseudo_left = 0x200, pe_order_implies_then_on_node = 0x400, pe_order_probe = 0x800, pe_order_restart = 0x1000,
  pe_order_stonith_stop = 0x2000, pe_order_serialize_only = 0x4000, pe_order_same_node = 0x8000, pe_order_implies_first_printed = 0x10000,
  pe_order_implies_then_printed = 0x20000, pe_order_asymmetrical = 0x100000, pe_order_load = 0x200000, pe_order_one_or_more = 0x400000,
  pe_order_anti_colocation = 0x800000, pe_order_preserve = 0x1000000, pe_order_then_cancels_first = 0x2000000, pe_order_trace = 0x4000000
}
 

Functions

const char * rsc_printable_id (resource_t *rsc)
 
gboolean cluster_status (pe_working_set_t *data_set)
 
pe_working_set_tpe_new_working_set (void)
 Create a new working set. More...
 
void pe_free_working_set (pe_working_set_t *data_set)
 Free a working set. More...
 
void set_working_set_defaults (pe_working_set_t *data_set)
 
void cleanup_calculations (pe_working_set_t *data_set)
 Reset working set to default state without freeing it or constraints. More...
 
void pe_reset_working_set (pe_working_set_t *data_set)
 Reset a working set to default state without freeing it. More...
 
resource_tpe_find_resource (GListPtr rsc_list, const char *id_rh)
 
resource_tpe_find_resource_with_flags (GListPtr rsc_list, const char *id, enum pe_find flags)
 
node_tpe_find_node (GListPtr node_list, const char *uname)
 
node_tpe_find_node_id (GListPtr node_list, const char *id)
 
node_tpe_find_node_any (GListPtr node_list, const char *id, const char *uname)
 
GListPtr find_operations (const char *rsc, const char *node, gboolean active_filter, pe_working_set_t *data_set)
 
int pe_bundle_replicas (const resource_t *rsc)
 Get the number of configured replicas in a bundle. More...
 

Detailed Description

Cluster status and scheduling.

Definition in file status.h.

Macro Definition Documentation

◆ pe_flag_concurrent_fencing

#define pe_flag_concurrent_fencing   0x00000080ULL

Definition at line 77 of file status.h.

◆ pe_flag_enable_unfencing

#define pe_flag_enable_unfencing   0x00000040ULL

Definition at line 76 of file status.h.

◆ pe_flag_have_quorum

#define pe_flag_have_quorum   0x00000001ULL

Definition at line 69 of file status.h.

◆ pe_flag_have_remote_nodes

#define pe_flag_have_remote_nodes   0x00040000ULL

Definition at line 89 of file status.h.

◆ pe_flag_have_status

#define pe_flag_have_status   0x00020000ULL

Definition at line 88 of file status.h.

◆ pe_flag_have_stonith_resource

#define pe_flag_have_stonith_resource   0x00000020ULL

Definition at line 75 of file status.h.

◆ pe_flag_is_managed_default

#define pe_flag_is_managed_default   0x00000004ULL

Definition at line 71 of file status.h.

◆ pe_flag_maintenance_mode

#define pe_flag_maintenance_mode   0x00000008ULL

Definition at line 72 of file status.h.

◆ pe_flag_no_compat

#define pe_flag_no_compat   0x01000000ULL

Skip deprecated code that is kept solely for backward API compatibility. (Internal code should always set this.)

Definition at line 101 of file status.h.

◆ pe_flag_no_counts

#define pe_flag_no_counts   0x00800000ULL

Don't count total, disabled and blocked resource instances.

Definition at line 96 of file status.h.

◆ pe_flag_quick_location

#define pe_flag_quick_location   0x00100000ULL

Definition at line 91 of file status.h.

◆ pe_flag_remove_after_stop

#define pe_flag_remove_after_stop   0x00002000ULL

Definition at line 84 of file status.h.

◆ pe_flag_sanitized

#define pe_flag_sanitized   0x00200000ULL

Definition at line 92 of file status.h.

◆ pe_flag_start_failure_fatal

#define pe_flag_start_failure_fatal   0x00001000ULL

Definition at line 83 of file status.h.

◆ pe_flag_startup_fencing

#define pe_flag_startup_fencing   0x00004000ULL

Definition at line 85 of file status.h.

◆ pe_flag_startup_probes

#define pe_flag_startup_probes   0x00010000ULL

Definition at line 87 of file status.h.

◆ pe_flag_stdout

#define pe_flag_stdout   0x00400000ULL

Definition at line 93 of file status.h.

◆ pe_flag_stonith_enabled

#define pe_flag_stonith_enabled   0x00000010ULL

Definition at line 74 of file status.h.

◆ pe_flag_stop_action_orphans

#define pe_flag_stop_action_orphans   0x00000200ULL

Definition at line 80 of file status.h.

◆ pe_flag_stop_everything

#define pe_flag_stop_everything   0x00000400ULL

Definition at line 81 of file status.h.

◆ pe_flag_stop_rsc_orphans

#define pe_flag_stop_rsc_orphans   0x00000100ULL

Definition at line 79 of file status.h.

◆ pe_flag_symmetric_cluster

#define pe_flag_symmetric_cluster   0x00000002ULL

Definition at line 70 of file status.h.

◆ pe_rsc_allocating

#define pe_rsc_allocating   0x00000200ULL

Definition at line 229 of file status.h.

◆ pe_rsc_allow_migrate

#define pe_rsc_allow_migrate   0x00800000ULL

Definition at line 245 of file status.h.

◆ pe_rsc_allow_remote_remotes

#define pe_rsc_allow_remote_remotes   0x00004000ULL

Definition at line 235 of file status.h.

◆ pe_rsc_block

#define pe_rsc_block   0x00000004ULL

Definition at line 221 of file status.h.

◆ pe_rsc_failed

#define pe_rsc_failed   0x00010000ULL

Definition at line 237 of file status.h.

◆ pe_rsc_failure_ignored

#define pe_rsc_failure_ignored   0x01000000ULL

Definition at line 247 of file status.h.

◆ pe_rsc_fence_device

#define pe_rsc_fence_device   0x00000040ULL

Definition at line 226 of file status.h.

◆ pe_rsc_have_unfencing

#define pe_rsc_have_unfencing   0x80000000ULL

Definition at line 255 of file status.h.

◆ pe_rsc_is_container

#define pe_rsc_is_container   0x08000000ULL

Definition at line 250 of file status.h.

◆ pe_rsc_maintenance

#define pe_rsc_maintenance   0x04000000ULL

Definition at line 249 of file status.h.

◆ pe_rsc_managed

#define pe_rsc_managed   0x00000002ULL

Definition at line 220 of file status.h.

◆ pe_rsc_merging

#define pe_rsc_merging   0x00000400ULL

Definition at line 230 of file status.h.

◆ pe_rsc_migrating

#define pe_rsc_migrating   0x00400000ULL

Definition at line 244 of file status.h.

◆ pe_rsc_munging

#define pe_rsc_munging   0x00000800ULL

Definition at line 231 of file status.h.

◆ pe_rsc_needs_fencing

#define pe_rsc_needs_fencing   0x20000000ULL

Definition at line 253 of file status.h.

◆ pe_rsc_needs_quorum

#define pe_rsc_needs_quorum   0x10000000ULL

Definition at line 252 of file status.h.

◆ pe_rsc_needs_unfencing

#define pe_rsc_needs_unfencing   0x40000000ULL

Definition at line 254 of file status.h.

◆ pe_rsc_notify

#define pe_rsc_notify   0x00000010ULL

Definition at line 224 of file status.h.

◆ pe_rsc_orphan

#define pe_rsc_orphan   0x00000001ULL

Definition at line 219 of file status.h.

◆ pe_rsc_orphan_container_filler

#define pe_rsc_orphan_container_filler   0x00000008ULL

Definition at line 222 of file status.h.

◆ pe_rsc_provisional

#define pe_rsc_provisional   0x00000100ULL

Definition at line 228 of file status.h.

◆ pe_rsc_reload

#define pe_rsc_reload   0x00002000ULL

Definition at line 234 of file status.h.

◆ pe_rsc_runnable

#define pe_rsc_runnable   0x00040000ULL

Definition at line 239 of file status.h.

◆ pe_rsc_shutdown

#define pe_rsc_shutdown   0x00020000ULL

Definition at line 238 of file status.h.

◆ pe_rsc_start_pending

#define pe_rsc_start_pending   0x00080000ULL

Definition at line 240 of file status.h.

◆ pe_rsc_starting

#define pe_rsc_starting   0x00100000ULL

Definition at line 242 of file status.h.

◆ pe_rsc_stopping

#define pe_rsc_stopping   0x00200000ULL

Definition at line 243 of file status.h.

◆ pe_rsc_try_reload

#define pe_rsc_try_reload   0x00001000ULL

Definition at line 233 of file status.h.

◆ pe_rsc_unexpectedly_running

#define pe_rsc_unexpectedly_running   0x02000000ULL

Definition at line 248 of file status.h.

◆ pe_rsc_unique

#define pe_rsc_unique   0x00000020ULL

Definition at line 225 of file status.h.

Typedef Documentation

◆ action_t

typedef struct pe_action_s action_t

Definition at line 34 of file status.h.

◆ action_wrapper_t

Definition at line 496 of file status.h.

◆ no_quorum_policy_t

◆ node_t

typedef struct node_s node_t

Definition at line 33 of file status.h.

◆ pe_action_t

typedef struct pe_action_s pe_action_t

Definition at line 35 of file status.h.

◆ pe_node_t

typedef struct node_s pe_node_t

Definition at line 32 of file status.h.

◆ pe_resource_t

typedef struct resource_s pe_resource_t

Definition at line 40 of file status.h.

◆ pe_working_set_t

◆ resource_t

typedef struct resource_s resource_t

Definition at line 36 of file status.h.

◆ tag_t

typedef struct tag_s tag_t

◆ ticket_t

typedef struct ticket_s ticket_t

Definition at line 37 of file status.h.

Enumeration Type Documentation

◆ no_quorum_policy_e

Enumerator
no_quorum_freeze 
no_quorum_stop 
no_quorum_ignore 
no_quorum_suicide 

Definition at line 42 of file status.h.

◆ node_type

enum node_type
Enumerator
node_ping 
node_member 
node_remote 

Definition at line 49 of file status.h.

◆ pe_action_flags

Enumerator
pe_action_pseudo 
pe_action_runnable 
pe_action_optional 
pe_action_print_always 
pe_action_have_node_attrs 
pe_action_failure_is_fatal 
pe_action_implied_by_stonith 
pe_action_migrate_runnable 
pe_action_dumped 
pe_action_processed 
pe_action_clear 
pe_action_dangle 
pe_action_requires_any 
pe_action_reschedule 
pe_action_tracking 

Definition at line 265 of file status.h.

◆ pe_check_parameters

Enumerator
pe_check_last_failure 
pe_check_active 

Definition at line 159 of file status.h.

◆ pe_discover_e

Enumerator
pe_discover_always 
pe_discover_never 
pe_discover_exclusive 

Definition at line 446 of file status.h.

◆ pe_find

enum pe_find
Enumerator
pe_find_renamed 
pe_find_anon 
pe_find_clone 
pe_find_current 
pe_find_inactive 
pe_find_any 

Definition at line 60 of file status.h.

◆ pe_graph_flags

Enumerator
pe_graph_none 
pe_graph_updated_first 
pe_graph_updated_then 
pe_graph_disable 

Definition at line 257 of file status.h.

◆ pe_link_state

Enumerator
pe_link_not_dumped 
pe_link_dumped 
pe_link_dup 

Definition at line 440 of file status.h.

◆ pe_ordering

Enumerator
pe_order_none 
pe_order_optional 
pe_order_apply_first_non_migratable 
pe_order_implies_first 
pe_order_implies_then 
pe_order_implies_first_master 
pe_order_implies_first_migratable 
pe_order_runnable_left 
pe_order_pseudo_left 
pe_order_implies_then_on_node 
pe_order_probe 
pe_order_restart 
pe_order_stonith_stop 
pe_order_serialize_only 
pe_order_same_node 
pe_order_implies_first_printed 
pe_order_implies_then_printed 
pe_order_asymmetrical 
pe_order_load 
pe_order_one_or_more 
pe_order_anti_colocation 
pe_order_preserve 
pe_order_then_cancels_first 
pe_order_trace 

Definition at line 453 of file status.h.

◆ pe_restart

enum pe_restart
Enumerator
pe_restart_restart 
pe_restart_ignore 

Definition at line 55 of file status.h.

Function Documentation

◆ cleanup_calculations()

void cleanup_calculations ( pe_working_set_t data_set)

Reset working set to default state without freeing it or constraints.

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

Definition at line 282 of file status.c.

◆ cluster_status()

gboolean cluster_status ( pe_working_set_t data_set)

Definition at line 86 of file status.c.

◆ find_operations()

GListPtr find_operations ( const char *  rsc,
const char *  node,
gboolean  active_filter,
pe_working_set_t data_set 
)

Definition at line 3644 of file unpack.c.

◆ pe_bundle_replicas()

int pe_bundle_replicas ( const resource_t rsc)

Get the number of configured replicas in a bundle.

Parameters
[in]rscBundle resource
Returns
Number of configured replicas, or 0 on error

Definition at line 1440 of file container.c.

◆ pe_find_node()

node_t* pe_find_node ( GListPtr  node_list,
const char *  uname 
)

Definition at line 444 of file status.c.

◆ pe_find_node_any()

node_t* pe_find_node_any ( GListPtr  node_list,
const char *  id,
const char *  uname 
)

Definition at line 416 of file status.c.

◆ pe_find_node_id()

node_t* pe_find_node_id ( GListPtr  node_list,
const char *  id 
)

Definition at line 428 of file status.c.

◆ pe_find_resource()

resource_t* pe_find_resource ( GListPtr  rsc_list,
const char *  id_rh 
)

Definition at line 392 of file status.c.

◆ pe_find_resource_with_flags()

resource_t* pe_find_resource_with_flags ( GListPtr  rsc_list,
const char *  id,
enum pe_find  flags 
)

Definition at line 398 of file status.c.

◆ pe_free_working_set()

void pe_free_working_set ( pe_working_set_t data_set)

Free a working set.

Parameters
[in]data_setWorking set to free

Definition at line 66 of file status.c.

◆ pe_new_working_set()

pe_working_set_t* pe_new_working_set ( void  )

Create a new working set.

Returns
New, initialized working set on success, else NULL (and set errno)
Note
Only pe_working_set_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 50 of file status.c.

◆ pe_reset_working_set()

void pe_reset_working_set ( pe_working_set_t data_set)

Reset a working set to default state without freeing it.

Parameters
[in,out]data_setWorking set to reset

Definition at line 342 of file status.c.

◆ rsc_printable_id()

const char* rsc_printable_id ( resource_t rsc)

Definition at line 2291 of file utils.c.

◆ set_working_set_defaults()

void set_working_set_defaults ( pe_working_set_t data_set)

Definition at line 372 of file status.c.