pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Data Structures | Typedefs | Enumerations
resources.h File Reference

Scheduler API for resources. More...

#include <sys/types.h>
#include <libxml/tree.h>
#include <glib.h>
#include <crm/common/roles.h>
#include <crm/common/scheduler_types.h>
Include dependency graph for resources.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  resource_object_functions_s
 Resource object methods. More...
 
struct  pe_resource_s
 Implementation of pcmk_resource_t. More...
 

Typedefs

typedef struct resource_alloc_functions_s pcmk_assignment_methods_t
 This type should be considered internal to Pacemaker. More...
 
typedef struct resource_object_functions_s pcmk_rsc_methods_t
 Resource object methods. More...
 

Enumerations

enum  pe_obj_types {
  pcmk_rsc_variant_unknown = -1, pcmk_rsc_variant_primitive = 0, pcmk_rsc_variant_group = 1, pcmk_rsc_variant_clone = 2,
  pcmk_rsc_variant_bundle = 3, pe_unknown = pcmk_rsc_variant_unknown, pe_native = pcmk_rsc_variant_primitive, pe_group = pcmk_rsc_variant_group,
  pe_clone = pcmk_rsc_variant_clone, pe_container = pcmk_rsc_variant_bundle
}
 Resource variants supported by Pacemaker. More...
 
enum  rsc_start_requirement {
  pcmk_requires_nothing = 0, pcmk_requires_quorum = 1, pcmk_requires_fencing = 2, rsc_req_nothing = pcmk_requires_nothing,
  rsc_req_quorum = pcmk_requires_quorum, rsc_req_stonith = pcmk_requires_fencing
}
 What resource needs before it can be recovered from a failed node. More...
 
enum  rsc_recovery_type {
  pcmk_multiply_active_restart = 0, pcmk_multiply_active_stop = 1, pcmk_multiply_active_block = 2, pcmk_multiply_active_unexpected = 3,
  recovery_stop_start = pcmk_multiply_active_restart, recovery_stop_only = pcmk_multiply_active_stop, recovery_block = pcmk_multiply_active_block, recovery_stop_unexpected = pcmk_multiply_active_unexpected
}
 How to recover a resource that is incorrectly active on multiple nodes. More...
 
enum  pcmk_rsc_flags {
  pcmk_no_rsc_flags = 0ULL, pcmk_rsc_removed = (1ULL << 0), pcmk_rsc_managed = (1ULL << 1), pcmk_rsc_blocked = (1ULL << 2),
  pcmk_rsc_removed_filler = (1ULL << 3), pcmk_rsc_notify = (1ULL << 4), pcmk_rsc_unique = (1ULL << 5), pcmk_rsc_fence_device = (1ULL << 6),
  pcmk_rsc_promotable = (1ULL << 7), pcmk_rsc_unassigned = (1ULL << 8), pcmk_rsc_assigning = (1ULL << 9), pcmk_rsc_updating_nodes = (1ULL << 10),
  pcmk_rsc_restarting = (1ULL << 11), pcmk_rsc_stop_if_failed = (1ULL << 12), pcmk_rsc_reload = (1ULL << 13), pcmk_rsc_remote_nesting_allowed = (1ULL << 14),
  pcmk_rsc_critical = (1ULL << 15), pcmk_rsc_failed = (1ULL << 16), pcmk_rsc_detect_loop = (1ULL << 17), pcmk_rsc_runnable = (1ULL << 18),
  pcmk_rsc_start_pending = (1ULL << 19), pcmk_rsc_starting = (1ULL << 20), pcmk_rsc_stopping = (1ULL << 21), pcmk_rsc_stop_unexpected = (1ULL << 22),
  pcmk_rsc_migratable = (1ULL << 23), pcmk_rsc_ignore_failure = (1ULL << 24), pcmk_rsc_replica_container = (1ULL << 25), pcmk_rsc_maintenance = (1ULL << 26),
  pcmk_rsc_has_filler = (1ULL << 27), pcmk_rsc_needs_quorum = (1ULL << 28), pcmk_rsc_needs_fencing = (1ULL << 29), pcmk_rsc_needs_unfencing = (1ULL << 30)
}
 Resource scheduling flags. More...
 
enum  pe_find {
  pcmk_rsc_match_history = (1 << 0), pcmk_rsc_match_anon_basename = (1 << 1), pcmk_rsc_match_clone_only = (1 << 2), pcmk_rsc_match_current_node = (1 << 3),
  pe_find_inactive = (1 << 4), pcmk_rsc_match_basename = (1 << 5), pe_find_renamed = pcmk_rsc_match_history, pe_find_anon = pcmk_rsc_match_anon_basename,
  pe_find_clone = pcmk_rsc_match_clone_only, pe_find_current = pcmk_rsc_match_current_node, pe_find_any = pcmk_rsc_match_basename
}
 Search options for resources (exact resource ID always matches) More...
 
enum  pe_restart { pe_restart_restart, pe_restart_ignore }
 
enum  pe_print_options {
  pe_print_log = (1 << 0), pe_print_html = (1 << 1), pe_print_ncurses = (1 << 2), pe_print_printf = (1 << 3),
  pe_print_dev = (1 << 4), pe_print_details = (1 << 5), pe_print_max_details = (1 << 6), pe_print_rsconly = (1 << 7),
  pe_print_ops = (1 << 8), pe_print_suppres_nl = (1 << 9), pe_print_xml = (1 << 10), pe_print_brief = (1 << 11),
  pe_print_pending = (1 << 12), pe_print_clone_details = (1 << 13), pe_print_clone_active = (1 << 14), pe_print_implicit = (1 << 15)
}
 

Detailed Description

Scheduler API for resources.

Definition in file resources.h.

Typedef Documentation

◆ pcmk_assignment_methods_t

This type should be considered internal to Pacemaker.

Definition at line 263 of file resources.h.

◆ pcmk_rsc_methods_t

Resource object methods.

Enumeration Type Documentation

◆ pcmk_rsc_flags

Resource scheduling flags.

Enumerator
pcmk_no_rsc_flags 

No resource flags set (compare with equality rather than bit set)

pcmk_rsc_removed 

Whether resource has been removed from the configuration.

pcmk_rsc_managed 

Whether resource is managed.

pcmk_rsc_blocked 

Whether resource is blocked from further action.

pcmk_rsc_removed_filler 

Whether resource has been removed but has a container.

pcmk_rsc_notify 

Whether resource has clone notifications enabled.

pcmk_rsc_unique 

Whether resource is not an anonymous clone instance.

pcmk_rsc_fence_device 

Whether resource's class is "stonith".

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_updating_nodes 

Whether resource is in the process of modifying allowed node scores.

pcmk_rsc_restarting 

Whether resource is in the process of scheduling actions to restart.

pcmk_rsc_stop_if_failed 

Whether resource must be stopped (instead of demoted) if it is failed.

pcmk_rsc_reload 

Whether a reload action has been scheduled for resource.

pcmk_rsc_remote_nesting_allowed 

Whether resource is a remote connection allowed to run on a remote node.

pcmk_rsc_critical 

Whether resource has "critical" meta-attribute enabled.

pcmk_rsc_failed 

Whether resource is considered failed.

pcmk_rsc_detect_loop 

Flag for non-scheduler code to use to detect recursion loops.

pcmk_rsc_runnable 
Deprecated:
Do not use
pcmk_rsc_start_pending 

Whether resource has pending start action in history.

pcmk_rsc_starting 
Deprecated:
Do not use
pcmk_rsc_stopping 
Deprecated:
Do not use
pcmk_rsc_stop_unexpected 

Whether resource is multiply active with recovery set to stop_unexpected.

pcmk_rsc_migratable 

Whether resource is allowed to live-migrate.

pcmk_rsc_ignore_failure 

Whether resource has an ignorable failure.

pcmk_rsc_replica_container 

Whether resource is an implicit container resource for a bundle replica.

pcmk_rsc_maintenance 

Whether resource, its node, or entire cluster is in maintenance mode.

pcmk_rsc_has_filler 
Deprecated:
Do not use
pcmk_rsc_needs_quorum 

Whether resource can be started or promoted only on quorate nodes.

pcmk_rsc_needs_fencing 

Whether resource requires fencing before recovery if on unclean node.

pcmk_rsc_needs_unfencing 

Whether resource can be started or promoted only on unfenced nodes.

Definition at line 98 of file resources.h.

◆ pe_find

enum pe_find

Search options for resources (exact resource ID always matches)

Enumerator
pcmk_rsc_match_history 

Also match clone instance ID from resource history.

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_current_node 

If matching by node, compare current node instead of assigned node.

pe_find_inactive 
Deprecated:
Do not use
pcmk_rsc_match_basename 

Match clone instances (even unique) by base name as well as exact ID.

pe_find_renamed 
Deprecated:
Use pcmk_rsc_match_history instead
pe_find_anon 
Deprecated:
Use pcmk_rsc_match_anon_basename instead
pe_find_clone 
Deprecated:
Use pcmk_rsc_match_clone_only instead
pe_find_current 
Deprecated:
Use pcmk_rsc_match_current_node instead
pe_find_any 
Deprecated:
Use pcmk_rsc_match_basename instead

Definition at line 197 of file resources.h.

◆ pe_obj_types

Resource variants supported by Pacemaker.

Enumerator
pcmk_rsc_variant_unknown 

Unknown resource variant.

pcmk_rsc_variant_primitive 

Primitive resource.

pcmk_rsc_variant_group 

Group resource.

pcmk_rsc_variant_clone 

Clone resource.

pcmk_rsc_variant_bundle 

Bundle resource.

pe_unknown 
Deprecated:
Use pcmk_rsc_variant_unknown instead
pe_native 
Deprecated:
Use pcmk_rsc_variant_primitive instead
pe_group 
Deprecated:
Use pcmk_rsc_variant_group instead
pe_clone 
Deprecated:
Use pcmk_rsc_variant_clone instead
pe_container 
Deprecated:
Use pcmk_rsc_variant_bundle instead

Definition at line 31 of file resources.h.

◆ pe_print_options

Deprecated:
Do not use
Enumerator
pe_print_log 
pe_print_html 
pe_print_ncurses 
pe_print_printf 
pe_print_dev 
pe_print_details 
pe_print_max_details 
pe_print_rsconly 
pe_print_ops 
pe_print_suppres_nl 
pe_print_xml 
pe_print_brief 
pe_print_pending 
pe_print_clone_details 
pe_print_clone_active 
pe_print_implicit 

Definition at line 241 of file resources.h.

◆ pe_restart

enum pe_restart
Deprecated:
Do not use
Enumerator
pe_restart_restart 
pe_restart_ignore 

Definition at line 236 of file resources.h.

◆ rsc_recovery_type

How to recover a resource that is incorrectly active on multiple nodes.

Enumerator
pcmk_multiply_active_restart 

Stop on all, start on desired.

pcmk_multiply_active_stop 

Stop on all and leave stopped.

pcmk_multiply_active_block 

Do nothing to resource.

pcmk_multiply_active_unexpected 

Stop unexpected instances.

recovery_stop_start 
Deprecated:
Use pcmk_multiply_active_restart instead
recovery_stop_only 
Deprecated:
Use pcmk_multiply_active_stop instead
recovery_block 
Deprecated:
Use pcmk_multiply_active_block instead
recovery_stop_unexpected 
Deprecated:
Use pcmk_multiply_active_unexpected instead

Definition at line 76 of file resources.h.

◆ rsc_start_requirement

What resource needs before it can be recovered from a failed node.

Enumerator
pcmk_requires_nothing 

Resource can be recovered immediately.

pcmk_requires_quorum 

Resource can be recovered if quorate.

pcmk_requires_fencing 

Resource can be recovered after fencing.

rsc_req_nothing 
Deprecated:
Use pcmk_requires_nothing instead
rsc_req_quorum 
Deprecated:
Use pcmk_requires_quorum instead
rsc_req_stonith 
Deprecated:
Use pcmk_requires_fencing instead

Definition at line 58 of file resources.h.