10#ifndef PCMK__CRM_COMMON_RESOURCES__H
11# define PCMK__CRM_COMMON_RESOURCES__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);
pcmk_scheduler_t * scheduler
rsc_start_requirement
What resource needs before it can be recovered from a failed node.
@ pcmk_requires_fencing
Resource can be recovered after fencing.
@ pcmk_requires_quorum
Resource can be recovered if quorate.
@ pcmk_requires_nothing
Resource can be recovered immediately.
rsc_recovery_type
How to recover a resource that is incorrectly active on multiple nodes.
@ pcmk_multiply_active_block
Do nothing to resource.
@ pcmk_multiply_active_restart
Stop on all, start on desired.
@ pcmk_multiply_active_stop
Stop on all and leave stopped.
@ recovery_stop_unexpected
@ pcmk_multiply_active_unexpected
Stop unexpected instances.
pe_find
Search options for resources (exact resource ID always matches)
@ pcmk_rsc_match_anon_basename
Also match anonymous clone instances by base name.
@ pcmk_rsc_match_clone_only
Match only clones and their instances, by either clone or instance ID.
@ pcmk_rsc_match_basename
Match clone instances (even unique) by base name as well as exact ID.
@ pcmk_rsc_match_history
Also match clone instance ID from resource history.
@ pcmk_rsc_match_current_node
If matching by node, compare current node instead of assigned node.
pe_obj_types
Resource variants supported by Pacemaker.
@ pcmk_rsc_variant_group
Group resource.
@ pcmk_rsc_variant_primitive
Primitive resource.
@ pcmk_rsc_variant_bundle
Bundle resource.
@ pcmk_rsc_variant_unknown
Unknown resource variant.
@ pcmk_rsc_variant_clone
Clone resource.
pcmk_rsc_flags
Resource scheduling flags.
@ pcmk_rsc_detect_loop
Flag for non-scheduler code to use to detect recursion loops.
@ pcmk_rsc_promotable
Whether resource can be promoted and demoted.
@ pcmk_rsc_unassigned
Whether resource has not yet been assigned to a node.
@ pcmk_rsc_assigning
Whether resource is in the process of being assigned to a node.
@ pcmk_rsc_stop_if_failed
Whether resource must be stopped (instead of demoted) if it is failed.
@ pcmk_rsc_critical
Whether resource has "critical" meta-attribute enabled.
@ pcmk_rsc_migratable
Whether resource is allowed to live-migrate.
@ pcmk_rsc_unique
Whether resource is not an anonymous clone instance.
@ pcmk_rsc_maintenance
Whether resource, its node, or entire cluster is in maintenance mode.
@ pcmk_no_rsc_flags
No resource flags set (compare with equality rather than bit set)
@ pcmk_rsc_needs_fencing
Whether resource requires fencing before recovery if on unclean node.
@ pcmk_rsc_replica_container
Whether resource is an implicit container resource for a bundle replica.
@ pcmk_rsc_needs_unfencing
Whether resource can be started or promoted only on unfenced nodes.
@ pcmk_rsc_removed
Whether resource has been removed from the configuration.
@ pcmk_rsc_notify
Whether resource has clone notifications enabled.
@ pcmk_rsc_updating_nodes
Whether resource is in the process of modifying allowed node scores.
@ pcmk_rsc_remote_nesting_allowed
Whether resource is a remote connection allowed to run on a remote node.
@ pcmk_rsc_reload
Whether a reload action has been scheduled for resource.
@ pcmk_rsc_start_pending
Whether resource has pending start action in history.
@ pcmk_rsc_blocked
Whether resource is blocked from further action.
@ pcmk_rsc_restarting
Whether resource is in the process of scheduling actions to restart.
@ pcmk_rsc_fence_device
Whether resource's class is "stonith".
@ pcmk_rsc_needs_quorum
Whether resource can be started or promoted only on quorate nodes.
@ pcmk_rsc_removed_filler
Whether resource has been removed but has a container.
@ pcmk_rsc_stop_unexpected
Whether resource is multiply active with recovery set to stop_unexpected.
@ pcmk_rsc_managed
Whether resource is managed.
@ pcmk_rsc_ignore_failure
Whether resource has an ignorable failure.
@ pcmk_rsc_failed
Whether resource is considered failed.
struct resource_object_functions_s pcmk_rsc_methods_t
Resource object methods.
Scheduler API for resource roles.
Type aliases needed to define scheduler objects.
Implementation of pcmk_node_t.
Implementation of pcmk_resource_t.
pcmk_assignment_methods_t * cmds
Resource assignment methods.
GList * running_on
Nodes where resource may be active.
int failure_timeout
Failure timeout.
enum pe_obj_types variant
Resource variant.
pcmk_node_t * partial_migration_target
The destination node, if migrate_to completed but migrate_from has not.
GHashTable * meta
Resource's meta-attributes.
GList * children
Resource's child resources, if any.
pcmk_scheduler_t * cluster
Cluster that resource is part of.
int migration_threshold
Migration threshold.
gboolean exclusive_discover
Whether exclusive probing is enabled.
pcmk_node_t * partial_migration_source
The source node, if migrate_to completed but migrate_from has not.
enum pe_restart restart_type
pcmk_resource_t * container
Resource containing this one, if any.
pcmk_rsc_methods_t * fns
Resource object methods.
GHashTable * known_on
Nodes where resource has been probed (key is node ID, not name)
char * clone_name
Resource instance ID in history.
int priority
Configured priority.
gboolean is_remote_node
Whether this is a remote connection.
char * id
Resource ID in configuration.
pcmk_node_t * allocated_to
Node resource is assigned to.
xmlNode * xml
Resource configuration (possibly expanded from template)
GHashTable * utilization
Resource's utilization attributes.
GHashTable * allowed_nodes
Nodes where resource may run (key is node ID, not name)
GList * dangling_migrations
int sort_index
Promotion score on assigned node.
pcmk_node_t * lock_node
Resource shutdown-locked to this node.
GHashTable * parameter_cache
void * variant_opaque
Variant-specific (and private) data.
unsigned long long flags
Group of enum pcmk_rsc_flags.
pcmk_node_t * pending_node
Node on which pending_task is happening.
char * pending_task
Pending action in history, if any.
guint remote_reconnect_ms
Retry interval for remote connections.
enum rsc_recovery_type recovery_type
How to recover if failed.
GList * fillers
Resources contained by this one, if any.
xmlNode * orig_xml
Original resource configuration, if using template.
enum rsc_role_e next_role
Resource's scheduled next role.
enum rsc_role_e role
Resource's current role.
int stickiness
Extra preference for current node.
pcmk_resource_t * parent
Resource's parent resource, if any.
xmlNode * ops_xml
Configuration of resource operations (possibly expanded from template)
time_t lock_time
When shutdown lock started.
Implementation of pcmk_scheduler_t.
void(* free)(pcmk_resource_t *rsc)
Free all memory used by a resource.
void(* print)(pcmk_resource_t *rsc, const char *pre_text, long options, void *print_data)
enum rsc_role_e(* state)(const pcmk_resource_t *rsc, gboolean current)
Get resource's current or assigned role.
void(* count)(pcmk_resource_t *rsc)
Increment cluster's instance counts for a resource.
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.
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.
gboolean(* active)(pcmk_resource_t *rsc, gboolean all)
Check whether a resource is active.