18 #define OCF_RESKEY_PREFIX "OCF_RESKEY_" 19 #define LRM_TARGET_ENV OCF_RESKEY_PREFIX CRM_META "_" PCMK__META_ON_NODE 46 const char *host_physical = NULL;
48 snprintf(buf + offset,
sizeof(buf) - offset,
"%s", target_var);
51 snprintf(buf + offset,
sizeof(buf) - offset,
"%s", phys_var);
52 host_physical = getenv(buf);
90 if (pcmk__str_empty(rsc_id)) {
91 rsc_id = getenv(
"OCF_RESOURCE_INSTANCE");
92 if (pcmk__str_empty(rsc_id)) {
118 const char *value = NULL;
119 const char *node_type_s = NULL;
123 if ((node == NULL) || (
name == NULL)) {
130 if (!pcmk__is_guest_or_bundle_node(node)
134 name, pcmk__s(value,
""), pcmk__node_name(node));
148 crm_trace(
"Skipping %s lookup for %s because " 149 "its container %s is unassigned",
150 name, pcmk__node_name(node), container->
id);
153 node_type_s =
"assigned";
161 crm_trace(
"Skipping %s lookup for %s because " 162 "its container %s is inactive",
163 name, pcmk__node_name(node), container->
id);
166 node_type_s =
"current";
175 value = g_hash_table_lookup(
host->priv->attrs,
name);
176 crm_trace(
"%s='%s' for %s on %s container host %s",
177 name, pcmk__s(value,
""), pcmk__node_name(node), node_type_s,
178 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)
char * pcmk_promotion_score_name(const char *rsc_id)
Return the name of the node attribute used as a promotion score.
pcmk__node_private_t * priv
#define crm_trace(fmt, args...)
pcmk_node_t * assigned_node
pcmk__resource_private_t * priv
Wrappers for and extensions to libxml2.
#define PCMK__META_PHYSICAL_HOST
#define pcmk__assert(expr)
pcmk_resource_t * launcher
const char * pcmk__node_attr_target(const char *name)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
char * crm_meta_name(const char *field)
Get the environment variable equivalent of a meta-attribute name.