pacemaker 2.1.7-2.1.7
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
nodes.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2023 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__CRM_COMMON_NODES__H
11# define PCMK__CRM_COMMON_NODES__H
12
13#include <glib.h> // gboolean, GList, GHashTable
14
15#include <crm/common/scheduler_types.h> // pcmk_resource_t, pcmk_scheduler_t
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
27// Special node attributes
28
29#define PCMK_NODE_ATTR_TERMINATE "terminate"
30
31
36
38#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
41
44#endif
45};
46
52
53#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
56
59
62#endif
63};
64
67 const char *id;
68 const char *uname;
70
71 // @TODO Convert these into a flag group
72 gboolean online;
73 gboolean standby;
74 gboolean standby_onfail;
75 gboolean pending;
76 gboolean unclean;
77 gboolean unseen;
78 gboolean shutdown;
79 gboolean expected_up;
80 gboolean is_dc;
81 gboolean maintenance;
83
89
95
101
102 gboolean unpacked;
103
109
112
113 GList *running_rsc;
115 GHashTable *attrs;
116 GHashTable *utilization;
117 GHashTable *digest_cache;
118
125
127};
128
130struct pe_node_s {
131 int weight;
132 gboolean fixed;
133 int count;
135
136 // @COMPAT This should be enum pe_discover_e
138};
139
140#ifdef __cplusplus
141}
142#endif
143
144#endif // PCMK__CRM_COMMON_NODES__H
node_type
Possible node types.
Definition nodes.h:33
@ node_ping
Definition nodes.h:37
@ node_remote
Definition nodes.h:43
@ pcmk_node_variant_remote
Pacemaker Remote node.
Definition nodes.h:35
@ pcmk_node_variant_cluster
Cluster layer node.
Definition nodes.h:34
@ node_member
Definition nodes.h:40
pe_discover_e
When to probe a resource on a node (as specified in location constraints)
Definition nodes.h:48
@ pe_discover_exclusive
Definition nodes.h:61
@ pe_discover_always
Probe only on designated nodes.
Definition nodes.h:55
@ pcmk_probe_never
Always probe resource on node.
Definition nodes.h:50
@ pe_discover_never
Definition nodes.h:58
@ pcmk_probe_always
Definition nodes.h:49
@ pcmk_probe_exclusive
Never probe resource on node.
Definition nodes.h:51
Type aliases needed to define scheduler objects.
Implementation of pcmk_node_t.
Definition nodes.h:130
int weight
Node score for a given resource.
Definition nodes.h:131
int rsc_discover_mode
Probe mode (enum pe_discover_e)
Definition nodes.h:137
gboolean fixed
Definition nodes.h:132
int count
Counter reused by assignment and promotion code.
Definition nodes.h:133
struct pe_node_shared_s * details
Basic node information.
Definition nodes.h:134
Basic node information (all node objects for the same node share this)
Definition nodes.h:66
GHashTable * attrs
Node attributes.
Definition nodes.h:115
int num_resources
Definition nodes.h:108
gboolean shutdown
Whether shutting down.
Definition nodes.h:78
GHashTable * digest_cache
Cache of calculated resource digests.
Definition nodes.h:117
gboolean expected_up
Whether expected join state is member.
Definition nodes.h:79
const char * id
Node ID at the cluster layer.
Definition nodes.h:67
gboolean online
Whether online.
Definition nodes.h:72
gboolean standby_onfail
Whether in standby mode due to on-fail.
Definition nodes.h:74
const char * uname
Node name in cluster.
Definition nodes.h:68
gboolean standby
Whether in standby mode.
Definition nodes.h:73
GHashTable * utilization
Node utilization attributes.
Definition nodes.h:116
gboolean unpacked
Whether node history has been unpacked.
Definition nodes.h:102
pcmk_scheduler_t * data_set
Cluster that node is part of.
Definition nodes.h:126
gboolean remote_maintenance
Definition nodes.h:100
GList * allocated_rsc
List of resources assigned to node.
Definition nodes.h:114
gboolean is_dc
Whether node is cluster's DC.
Definition nodes.h:80
gboolean unclean
Whether node requires fencing.
Definition nodes.h:76
gboolean remote_requires_reset
Definition nodes.h:88
pcmk_resource_t * remote_rsc
Remote connection resource for node, if it is a Pacemaker Remote node.
Definition nodes.h:111
gboolean maintenance
Whether in maintenance mode.
Definition nodes.h:81
gboolean rsc_discovery_enabled
Whether probes are allowed on node.
Definition nodes.h:82
enum node_type type
Node variant.
Definition nodes.h:69
gboolean pending
Whether controller membership is pending.
Definition nodes.h:75
gboolean remote_was_fenced
Definition nodes.h:94
GList * running_rsc
List of resources active on node.
Definition nodes.h:113
gboolean unseen
Whether node has never joined cluster.
Definition nodes.h:77
Implementation of pcmk_resource_t.
Definition resources.h:399
Implementation of pcmk_scheduler_t.
Definition scheduler.h:172