22 #define OCF_RESKEY_PREFIX "OCF_RESKEY_" 23 #define LRM_TARGET_ENV OCF_RESKEY_PREFIX CRM_META "_" PCMK__META_ON_NODE 50 const char *host_physical = NULL;
52 snprintf(buf + offset,
sizeof(buf) - offset,
"%s", target_var);
55 snprintf(buf + offset,
sizeof(buf) - offset,
"%s", phys_var);
56 host_physical = getenv(buf);
94 if (pcmk__str_empty(rsc_id)) {
95 rsc_id = getenv(
"OCF_RESOURCE_INSTANCE");
96 if (pcmk__str_empty(rsc_id)) {
121 const char *value = NULL;
122 const char *node_type_s = NULL;
126 if ((node == NULL) || (
name == NULL)) {
133 if (!pcmk__is_guest_or_bundle_node(node)
137 name, pcmk__s(value,
""), pcmk__node_name(node));
151 crm_trace(
"Skipping %s lookup for %s because " 152 "its container %s is unassigned",
153 name, pcmk__node_name(node), container->
id);
156 node_type_s =
"assigned";
164 crm_trace(
"Skipping %s lookup for %s because " 165 "its container %s is inactive",
166 name, pcmk__node_name(node), container->
id);
169 node_type_s =
"current";
178 value = g_hash_table_lookup(
host->details->attrs,
name);
179 crm_trace(
"%s='%s' for %s on %s container host %s",
180 name, pcmk__s(value,
""), pcmk__node_name(node), node_type_s,
181 pcmk__node_name(
host));
#define OCF_RESKEY_PREFIX
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define PCMK_META_CONTAINER_ATTRIBUTE_TARGET
const char * pcmk__node_attr(const pcmk_node_t *node, const char *name, const char *target, enum pcmk__rsc_node node_type)
Where resource is assigned.
pcmk_resource_t * container
char * pcmk_promotion_score_name(const char *rsc_id)
Return the name of the node attribute used as a promotion score.
#define crm_trace(fmt, args...)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
struct pe_node_shared_s * details
Wrappers for and extensions to libxml2.
#define PCMK__META_PHYSICAL_HOST
#define pcmk__assert(expr)
pcmk_node_t * allocated_to
const char * pcmk__node_attr_target(const char *name)
pcmk_resource_t * remote_rsc
Where resource is running.
char * crm_meta_name(const char *field)
Get the environment variable equivalent of a meta-attribute name.