pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Data Structures | Typedefs | Enumerations | Functions
resources.h File Reference

Scheduler API for resources. More...

#include <stdbool.h>
#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
 
struct  pe_resource_s
 

Typedefs

typedef struct resource_alloc_functions_s pcmk_assignment_methods_t
 
typedef struct resource_object_functions_s pcmk_rsc_methods_t
 

Enumerations

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_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
}
 
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
}
 
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
}
 
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)
}
 
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)
}
 

Functions

const char * pcmk_resource_id (const pcmk_resource_t *rsc)
 
bool pcmk_resource_is_managed (const pcmk_resource_t *rsc)
 

Detailed Description

Scheduler API for resources.

Definition in file resources.h.

Typedef Documentation

◆ pcmk_assignment_methods_t

Deprecated:
Do not use (public access will be removed in a future release)

Definition at line 249 of file resources.h.

◆ pcmk_rsc_methods_t

Deprecated:
Do not use (public access will be removed in a future release)

Enumeration Type Documentation

◆ pcmk_rsc_flags

Deprecated:
Do not use
Enumerator
pcmk_no_rsc_flags 
pcmk_rsc_removed 
pcmk_rsc_managed 
pcmk_rsc_blocked 
pcmk_rsc_removed_filler 
pcmk_rsc_notify 
pcmk_rsc_unique 
pcmk_rsc_fence_device 
pcmk_rsc_promotable 
pcmk_rsc_unassigned 
pcmk_rsc_assigning 
pcmk_rsc_updating_nodes 
pcmk_rsc_restarting 
pcmk_rsc_stop_if_failed 
pcmk_rsc_reload 
pcmk_rsc_remote_nesting_allowed 
pcmk_rsc_critical 
pcmk_rsc_failed 
pcmk_rsc_detect_loop 
pcmk_rsc_runnable 
pcmk_rsc_start_pending 
pcmk_rsc_starting 
pcmk_rsc_stopping 
pcmk_rsc_stop_unexpected 
pcmk_rsc_migratable 
pcmk_rsc_ignore_failure 
pcmk_rsc_replica_container 
pcmk_rsc_maintenance 
pcmk_rsc_has_filler 
pcmk_rsc_needs_quorum 
pcmk_rsc_needs_fencing 
pcmk_rsc_needs_unfencing 

Definition at line 80 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 183 of file resources.h.

◆ pe_obj_types

Deprecated:
Do not use
Enumerator
pcmk_rsc_variant_unknown 
pcmk_rsc_variant_primitive 
pcmk_rsc_variant_group 
pcmk_rsc_variant_clone 
pcmk_rsc_variant_bundle 
pe_unknown 
pe_native 
pe_group 
pe_clone 
pe_container 

Definition at line 34 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 227 of file resources.h.

◆ pe_restart

enum pe_restart
Deprecated:
Do not use
Enumerator
pe_restart_restart 
pe_restart_ignore 

Definition at line 222 of file resources.h.

◆ rsc_recovery_type

Deprecated:
Do not use
Enumerator
pcmk_multiply_active_restart 
pcmk_multiply_active_stop 
pcmk_multiply_active_block 
pcmk_multiply_active_unexpected 
recovery_stop_start 
recovery_stop_only 
recovery_block 
recovery_stop_unexpected 

Definition at line 65 of file resources.h.

◆ rsc_start_requirement

Deprecated:
Do not use
Enumerator
pcmk_requires_nothing 
pcmk_requires_quorum 
pcmk_requires_fencing 
rsc_req_nothing 
rsc_req_quorum 
rsc_req_stonith 

Definition at line 52 of file resources.h.

Function Documentation

◆ pcmk_resource_id()

const char* pcmk_resource_id ( const pcmk_resource_t rsc)

Definition at line 27 of file resources.c.

◆ pcmk_resource_is_managed()

bool pcmk_resource_is_managed ( const pcmk_resource_t rsc)

Definition at line 41 of file resources.c.