10 #ifndef PCMK__CRM_COMMON_RESOURCES__H 11 # define PCMK__CRM_COMMON_RESOURCES__H 13 #include <sys/types.h> 14 #include <libxml/tree.h> 39 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 63 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 82 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 216 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 370 gboolean check_parent);
385 unsigned int *count_all,
386 unsigned int *count_clean);
502 #endif // PCMK__CRM_COMMON_RESOURCES__H pcmk_assignment_methods_t * cmds
Resource assignment methods.
Whether resource has clone notifications enabled.
xmlNode * orig_xml
Original resource configuration, if using template.
Whether resource has been removed but has a container.
Resource can be recovered after fencing.
pcmk_rsc_flags
Resource scheduling flags.
GHashTable * known_on
Nodes where resource has been probed (key is node ID, not name)
pcmk_scheduler_t * cluster
Cluster that resource is part of.
xmlNode * ops_xml
Configuration of resource operations (possibly expanded from template)
Resource can be recovered immediately.
Also match anonymous clone instances by base name.
pcmk_node_t * partial_migration_target
The destination node, if migrate_to completed but migrate_from has not.
Whether resource is an implicit container resource for a bundle replica.
Type aliases needed to define scheduler objects.
pe_find
Search options for resources (exact resource ID always matches)
enum rsc_role_e role
Resource's current role.
GList * children
Resource's child resources, if any.
Match only clones and their instances, by either clone or instance ID.
Whether resource can be started or promoted only on quorate nodes.
xmlNode * xml
Resource configuration (possibly expanded from template)
enum rsc_role_e(* state)(const pcmk_resource_t *rsc, gboolean current)
Get resource's current or assigned role.
enum rsc_role_e next_role
Resource's scheduled next role.
gboolean exclusive_discover
Whether exclusive probing is enabled.
GHashTable * meta
Resource's meta-attributes.
Whether resource, its node, or entire cluster is in maintenance mode.
int migration_threshold
Migration threshold.
void(* print)(pcmk_resource_t *rsc, const char *pre_text, long options, void *print_data)
pcmk_resource_t * container
Resource containing this one, if any.
Implementation of pcmk_scheduler_t.
char * pending_task
Pending action in history, if any.
rsc_start_requirement
What resource needs before it can be recovered from a failed node.
Also match clone instance ID from resource history.
Stop on all and leave stopped.
pcmk_resource_t * parent
Resource's parent resource, if any.
GList * dangling_migrations
guint remote_reconnect_ms
Retry interval for remote connections.
void(* free)(pcmk_resource_t *rsc)
Free all memory used by a resource.
Whether resource is in the process of being assigned to a node.
gboolean(* unpack)(pcmk_resource_t *rsc, pcmk_scheduler_t *scheduler)
Parse variant-specific resource XML from CIB into struct members.
unsigned int(* max_per_node)(const pcmk_resource_t *rsc)
Get maximum resource instances per node.
Implementation of pcmk_resource_t.
Scheduler API for resource roles.
int failure_timeout
Failure timeout.
int priority
Configured priority.
Whether resource is considered failed.
Whether resource must be stopped (instead of demoted) if it is failed.
struct resource_object_functions_s pcmk_rsc_methods_t
Resource object methods.
Whether resource is multiply active with recovery set to stop_unexpected.
enum rsc_recovery_type recovery_type
How to recover if failed.
pe_obj_types
Resource variants supported by Pacemaker.
unsigned long long flags
Group of enum pcmk_rsc_flags.
char * clone_name
Resource instance ID in history.
Match clone instances (even unique) by base name as well as exact ID.
time_t lock_time
When shutdown lock started.
enum pe_restart restart_type
rsc_recovery_type
How to recover a resource that is incorrectly active on multiple nodes.
GHashTable * utilization
Resource's utilization attributes.
Flag for non-scheduler code to use to detect recursion loops.
Whether resource is blocked from further action.
Implementation of pcmk_node_t.
enum pe_obj_types variant
Resource variant.
Stop unexpected instances.
Resource can be recovered if quorate.
Whether resource has pending start action in history.
Whether resource has "critical" meta-attribute enabled.
Whether resource is in the process of scheduling actions to restart.
GList * fillers
Resources contained by this one, if any.
Whether resource has an ignorable failure.
Whether resource has not yet been assigned to a node.
gboolean(* active)(pcmk_resource_t *rsc, gboolean all)
Check whether a resource is active.
Whether resource is a remote connection allowed to run on a remote node.
Whether resource is in the process of modifying allowed node scores.
gboolean is_remote_node
Whether this is a remote connection.
Whether resource requires fencing before recovery if on unclean node.
Whether resource's class is "stonith".
pcmk_rsc_methods_t * fns
Resource object methods.
void * variant_opaque
Variant-specific (and private) data.
int sort_index
Promotion score on assigned node.
pcmk_scheduler_t * scheduler
If matching by node, compare current node instead of assigned node.
pcmk_node_t * lock_node
Resource shutdown-locked to this node.
Whether resource is allowed to live-migrate.
Stop on all, start on desired.
pcmk_node_t * allocated_to
Node resource is assigned to.
gboolean(* is_filtered)(const pcmk_resource_t *rsc, GList *only_rsc, gboolean check_parent)
Check whether a given resource is in a list of resources.
GList * running_on
Nodes where resource may be active.
Whether a reload action has been scheduled for resource.
GHashTable * parameter_cache
pcmk_node_t * pending_node
Node on which pending_task is happening.
Whether resource can be promoted and demoted.
int stickiness
Extra preference for current node.
Whether resource is managed.
Whether resource can be started or promoted only on unfenced nodes.
Whether resource has been removed from the configuration.
Whether resource is not an anonymous clone instance.
Unknown resource variant.
void(* count)(pcmk_resource_t *rsc)
Increment cluster's instance counts for a resource.
pcmk_node_t * partial_migration_source
The source node, if migrate_to completed but migrate_from has not.
No resource flags set (compare with equality rather than bit set)
char * id
Resource ID in configuration.
GHashTable * allowed_nodes
Nodes where resource may run (key is node ID, not name)