|
 |
356a11 |
From 3d0b886202c155902470a0552d73343dbc0f0178 Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Wed, 27 Sep 2017 12:05:50 -0500
|
|
 |
356a11 |
Subject: [PATCH 1/6] Log: attrd: "peer peer loss" -> "peer loss"
|
|
 |
356a11 |
|
|
 |
356a11 |
---
|
|
 |
356a11 |
attrd/commands.c | 2 +-
|
|
 |
356a11 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/attrd/commands.c b/attrd/commands.c
|
|
 |
356a11 |
index dffbea3..27d0b73 100644
|
|
 |
356a11 |
--- a/attrd/commands.c
|
|
 |
356a11 |
+++ b/attrd/commands.c
|
|
 |
356a11 |
@@ -919,7 +919,7 @@ attrd_peer_change_cb(enum crm_status_type kind, crm_node_t *peer, const void *da
|
|
 |
356a11 |
}
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
/* Remove all attribute values associated with lost nodes */
|
|
 |
356a11 |
- attrd_peer_remove(peer->uname, FALSE, "peer loss");
|
|
 |
356a11 |
+ attrd_peer_remove(peer->uname, FALSE, "loss");
|
|
 |
356a11 |
if (peer_writer && safe_str_eq(peer->uname, peer_writer)) {
|
|
 |
356a11 |
free(peer_writer);
|
|
 |
356a11 |
peer_writer = NULL;
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
From 91105a32e24b5addaf281595c35892bd0ceb0e44 Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Wed, 27 Sep 2017 12:11:49 -0500
|
|
 |
356a11 |
Subject: [PATCH 2/6] Refactor: pengine,libpe_status: prefix resource discovery
|
|
 |
356a11 |
values
|
|
 |
356a11 |
|
|
 |
356a11 |
now that they're publicly exposed
|
|
 |
356a11 |
---
|
|
 |
356a11 |
include/crm/pengine/status.h | 9 ++++-----
|
|
 |
356a11 |
lib/pengine/container.c | 6 +++---
|
|
 |
356a11 |
pengine/allocate.c | 2 +-
|
|
 |
356a11 |
pengine/clone.c | 2 +-
|
|
 |
356a11 |
pengine/native.c | 8 ++++----
|
|
 |
356a11 |
pengine/pengine.h | 2 +-
|
|
 |
356a11 |
pengine/utils.c | 6 +++---
|
|
 |
356a11 |
7 files changed, 17 insertions(+), 18 deletions(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h
|
|
 |
356a11 |
index 16724a7..9b4e944 100644
|
|
 |
356a11 |
--- a/include/crm/pengine/status.h
|
|
 |
356a11 |
+++ b/include/crm/pengine/status.h
|
|
 |
356a11 |
@@ -402,11 +402,10 @@ enum pe_link_state {
|
|
 |
356a11 |
pe_link_dup,
|
|
 |
356a11 |
};
|
|
 |
356a11 |
|
|
 |
356a11 |
-
|
|
 |
356a11 |
-enum rsc_discover_e {
|
|
 |
356a11 |
- discover_always = 0,
|
|
 |
356a11 |
- discover_never,
|
|
 |
356a11 |
- discover_exclusive,
|
|
 |
356a11 |
+enum pe_discover_e {
|
|
 |
356a11 |
+ pe_discover_always = 0,
|
|
 |
356a11 |
+ pe_discover_never,
|
|
 |
356a11 |
+ pe_discover_exclusive,
|
|
 |
356a11 |
};
|
|
 |
356a11 |
|
|
 |
356a11 |
/* *INDENT-OFF* */
|
|
 |
356a11 |
diff --git a/lib/pengine/container.c b/lib/pengine/container.c
|
|
 |
356a11 |
index 15234e3..ccbbcb6 100644
|
|
 |
356a11 |
--- a/lib/pengine/container.c
|
|
 |
356a11 |
+++ b/lib/pengine/container.c
|
|
 |
356a11 |
@@ -499,7 +499,7 @@ disallow_node(resource_t *rsc, const char *uname)
|
|
 |
356a11 |
|
|
 |
356a11 |
if (match) {
|
|
 |
356a11 |
((pe_node_t *) match)->weight = -INFINITY;
|
|
 |
356a11 |
- ((pe_node_t *) match)->rsc_discover_mode = discover_never;
|
|
 |
356a11 |
+ ((pe_node_t *) match)->rsc_discover_mode = pe_discover_never;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
if (rsc->children) {
|
|
 |
356a11 |
GListPtr child;
|
|
 |
356a11 |
@@ -573,7 +573,7 @@ create_remote_resource(
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
node->weight = -INFINITY;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
- node->rsc_discover_mode = discover_never;
|
|
 |
356a11 |
+ node->rsc_discover_mode = pe_discover_never;
|
|
 |
356a11 |
|
|
 |
356a11 |
/* unpack_remote_nodes() ensures that each remote node and guest node
|
|
 |
356a11 |
* has a pe_node_t entry. Ideally, it would do the same for bundle nodes.
|
|
 |
356a11 |
@@ -598,7 +598,7 @@ create_remote_resource(
|
|
 |
356a11 |
|
|
 |
356a11 |
tuple->node = node_copy(node);
|
|
 |
356a11 |
tuple->node->weight = 500;
|
|
 |
356a11 |
- tuple->node->rsc_discover_mode = discover_exclusive;
|
|
 |
356a11 |
+ tuple->node->rsc_discover_mode = pe_discover_exclusive;
|
|
 |
356a11 |
|
|
 |
356a11 |
/* Ensure the node shows up as allowed and with the correct discovery set */
|
|
 |
356a11 |
g_hash_table_insert(tuple->child->allowed_nodes, (gpointer) tuple->node->details->id, node_copy(tuple->node));
|
|
 |
356a11 |
diff --git a/pengine/allocate.c b/pengine/allocate.c
|
|
 |
356a11 |
index eef9a44..2a80f32 100644
|
|
 |
356a11 |
--- a/pengine/allocate.c
|
|
 |
356a11 |
+++ b/pengine/allocate.c
|
|
 |
356a11 |
@@ -956,7 +956,7 @@ rsc_discover_filter(resource_t *rsc, node_t *node)
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
match = g_hash_table_lookup(rsc->allowed_nodes, node->details->id);
|
|
 |
356a11 |
- if (match && match->rsc_discover_mode != discover_exclusive) {
|
|
 |
356a11 |
+ if (match && match->rsc_discover_mode != pe_discover_exclusive) {
|
|
 |
356a11 |
match->weight = -INFINITY;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
}
|
|
 |
356a11 |
diff --git a/pengine/clone.c b/pengine/clone.c
|
|
 |
356a11 |
index 41cb5cb..b10f0f3 100644
|
|
 |
356a11 |
--- a/pengine/clone.c
|
|
 |
356a11 |
+++ b/pengine/clone.c
|
|
 |
356a11 |
@@ -1359,7 +1359,7 @@ clone_create_probe(resource_t * rsc, node_t * node, action_t * complete,
|
|
 |
356a11 |
|
|
 |
356a11 |
if (rsc->exclusive_discover) {
|
|
 |
356a11 |
node_t *allowed = g_hash_table_lookup(rsc->allowed_nodes, node->details->id);
|
|
 |
356a11 |
- if (allowed && allowed->rsc_discover_mode != discover_exclusive) {
|
|
 |
356a11 |
+ if (allowed && allowed->rsc_discover_mode != pe_discover_exclusive) {
|
|
 |
356a11 |
/* exclusive discover is enabled and this node is not marked
|
|
 |
356a11 |
* as a node this resource should be discovered on
|
|
 |
356a11 |
*
|
|
 |
356a11 |
diff --git a/pengine/native.c b/pengine/native.c
|
|
 |
356a11 |
index 3f52452..08f4c8a 100644
|
|
 |
356a11 |
--- a/pengine/native.c
|
|
 |
356a11 |
+++ b/pengine/native.c
|
|
 |
356a11 |
@@ -2105,7 +2105,7 @@ native_rsc_location(resource_t * rsc, rsc_to_node_t * constraint)
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
if (other_node->rsc_discover_mode < constraint->discover_mode) {
|
|
 |
356a11 |
- if (constraint->discover_mode == discover_exclusive) {
|
|
 |
356a11 |
+ if (constraint->discover_mode == pe_discover_exclusive) {
|
|
 |
356a11 |
rsc->exclusive_discover = TRUE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
/* exclusive > never > always... always is default */
|
|
 |
356a11 |
@@ -2860,7 +2860,7 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete,
|
|
 |
356a11 |
/* exclusive discover is enabled and this node is not in the allowed list. */
|
|
 |
356a11 |
pe_rsc_trace(rsc, "Skipping probe for %s on node %s, A", rsc->id, node->details->id);
|
|
 |
356a11 |
return FALSE;
|
|
 |
356a11 |
- } else if (allowed->rsc_discover_mode != discover_exclusive) {
|
|
 |
356a11 |
+ } else if (allowed->rsc_discover_mode != pe_discover_exclusive) {
|
|
 |
356a11 |
/* exclusive discover is enabled and this node is not marked
|
|
 |
356a11 |
* as a node this resource should be discovered on */
|
|
 |
356a11 |
pe_rsc_trace(rsc, "Skipping probe for %s on node %s, B", rsc->id, node->details->id);
|
|
 |
356a11 |
@@ -2868,7 +2868,7 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete,
|
|
 |
356a11 |
}
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if(allowed == NULL && node->rsc_discover_mode == discover_never) {
|
|
 |
356a11 |
+ if(allowed == NULL && node->rsc_discover_mode == pe_discover_never) {
|
|
 |
356a11 |
/* If this node was allowed to host this resource it would
|
|
 |
356a11 |
* have been explicitly added to the 'allowed_nodes' list.
|
|
 |
356a11 |
* However it wasn't and the node has discovery disabled, so
|
|
 |
356a11 |
@@ -2878,7 +2878,7 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete,
|
|
 |
356a11 |
return FALSE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (allowed && allowed->rsc_discover_mode == discover_never) {
|
|
 |
356a11 |
+ if (allowed && allowed->rsc_discover_mode == pe_discover_never) {
|
|
 |
356a11 |
/* this resource is marked as not needing to be discovered on this node */
|
|
 |
356a11 |
pe_rsc_trace(rsc, "Skipping probe for %s on node %s, discovery mode", rsc->id, node->details->id);
|
|
 |
356a11 |
return FALSE;
|
|
 |
356a11 |
diff --git a/pengine/pengine.h b/pengine/pengine.h
|
|
 |
356a11 |
index 2c13258..c88f5cf 100644
|
|
 |
356a11 |
--- a/pengine/pengine.h
|
|
 |
356a11 |
+++ b/pengine/pengine.h
|
|
 |
356a11 |
@@ -80,7 +80,7 @@ struct rsc_to_node_s {
|
|
 |
356a11 |
resource_t *rsc_lh;
|
|
 |
356a11 |
|
|
 |
356a11 |
enum rsc_role_e role_filter;
|
|
 |
356a11 |
- enum rsc_discover_e discover_mode;
|
|
 |
356a11 |
+ enum pe_discover_e discover_mode;
|
|
 |
356a11 |
GListPtr node_list_rh; /* node_t* */
|
|
 |
356a11 |
};
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/pengine/utils.c b/pengine/utils.c
|
|
 |
356a11 |
index 0cc6381..cae42a8 100644
|
|
 |
356a11 |
--- a/pengine/utils.c
|
|
 |
356a11 |
+++ b/pengine/utils.c
|
|
 |
356a11 |
@@ -83,11 +83,11 @@ rsc2node_new(const char *id, resource_t * rsc,
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
if (discover_mode == NULL || safe_str_eq(discover_mode, "always")) {
|
|
 |
356a11 |
- new_con->discover_mode = discover_always;
|
|
 |
356a11 |
+ new_con->discover_mode = pe_discover_always;
|
|
 |
356a11 |
} else if (safe_str_eq(discover_mode, "never")) {
|
|
 |
356a11 |
- new_con->discover_mode = discover_never;
|
|
 |
356a11 |
+ new_con->discover_mode = pe_discover_never;
|
|
 |
356a11 |
} else if (safe_str_eq(discover_mode, "exclusive")) {
|
|
 |
356a11 |
- new_con->discover_mode = discover_exclusive;
|
|
 |
356a11 |
+ new_con->discover_mode = pe_discover_exclusive;
|
|
 |
356a11 |
rsc->exclusive_discover = TRUE;
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
pe_err("Invalid %s value %s in location constraint", XML_LOCATION_ATTR_DISCOVERY, discover_mode);
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
From 964b3fcfa90e1e1772476ee428c68f13057f7964 Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Thu, 28 Sep 2017 17:47:16 -0500
|
|
 |
356a11 |
Subject: [PATCH 3/6] Refactor: pengine,libpe_status: prefix node attribute
|
|
 |
356a11 |
functions
|
|
 |
356a11 |
|
|
 |
356a11 |
since they're publicly exposed
|
|
 |
356a11 |
---
|
|
 |
356a11 |
include/crm/pengine/internal.h | 4 ++--
|
|
 |
356a11 |
lib/pengine/common.c | 5 ++---
|
|
 |
356a11 |
lib/pengine/unpack.c | 22 +++++++++++-----------
|
|
 |
356a11 |
lib/pengine/utils.c | 4 ++--
|
|
 |
356a11 |
pengine/allocate.c | 2 +-
|
|
 |
356a11 |
pengine/constraints.c | 2 +-
|
|
 |
356a11 |
pengine/master.c | 6 +++---
|
|
 |
356a11 |
pengine/native.c | 16 ++++++++--------
|
|
 |
356a11 |
tools/crm_mon.c | 2 +-
|
|
 |
356a11 |
9 files changed, 31 insertions(+), 32 deletions(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/include/crm/pengine/internal.h b/include/crm/pengine/internal.h
|
|
 |
356a11 |
index d91f54a..70dd7c7 100644
|
|
 |
356a11 |
--- a/include/crm/pengine/internal.h
|
|
 |
356a11 |
+++ b/include/crm/pengine/internal.h
|
|
 |
356a11 |
@@ -298,7 +298,7 @@ bool remote_id_conflict(const char *remote_name, pe_working_set_t *data);
|
|
 |
356a11 |
void common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data);
|
|
 |
356a11 |
resource_t *find_container_child(const char *stem, resource_t * rsc, node_t *node);
|
|
 |
356a11 |
bool fix_remote_addr(resource_t * rsc);
|
|
 |
356a11 |
-const char *node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc);
|
|
 |
356a11 |
-const char *node_attribute_raw(pe_node_t *node, const char *name);
|
|
 |
356a11 |
+const char *pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc);
|
|
 |
356a11 |
+const char *pe_node_attribute_raw(pe_node_t *node, const char *name);
|
|
 |
356a11 |
|
|
 |
356a11 |
#endif
|
|
 |
356a11 |
diff --git a/lib/pengine/common.c b/lib/pengine/common.c
|
|
 |
356a11 |
index 0e21aaa..9dd2472 100644
|
|
 |
356a11 |
--- a/lib/pengine/common.c
|
|
 |
356a11 |
+++ b/lib/pengine/common.c
|
|
 |
356a11 |
@@ -433,7 +433,7 @@ add_hash_param(GHashTable * hash, const char *name, const char *value)
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
const char *
|
|
 |
356a11 |
-node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc)
|
|
 |
356a11 |
+pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc)
|
|
 |
356a11 |
{
|
|
 |
356a11 |
const char *source;
|
|
 |
356a11 |
|
|
 |
356a11 |
@@ -471,11 +471,10 @@ node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc)
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
const char *
|
|
 |
356a11 |
-node_attribute_raw(pe_node_t *node, const char *name)
|
|
 |
356a11 |
+pe_node_attribute_raw(pe_node_t *node, const char *name)
|
|
 |
356a11 |
{
|
|
 |
356a11 |
if(node == NULL) {
|
|
 |
356a11 |
return NULL;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
return g_hash_table_lookup(node->details->attrs, name);
|
|
 |
356a11 |
}
|
|
 |
356a11 |
-
|
|
 |
356a11 |
diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c
|
|
 |
356a11 |
index a41f35e..48f9368 100644
|
|
 |
356a11 |
--- a/lib/pengine/unpack.c
|
|
 |
356a11 |
+++ b/lib/pengine/unpack.c
|
|
 |
356a11 |
@@ -1008,7 +1008,7 @@ unpack_handle_remote_attrs(node_t *this_node, xmlNode *state, pe_working_set_t *
|
|
 |
356a11 |
attrs = find_xml_node(state, XML_TAG_TRANSIENT_NODEATTRS, FALSE);
|
|
 |
356a11 |
add_node_attrs(attrs, this_node, TRUE, data_set);
|
|
 |
356a11 |
|
|
 |
356a11 |
- shutdown = node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
356a11 |
+ shutdown = pe_node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
356a11 |
if (shutdown != NULL && safe_str_neq("0", shutdown)) {
|
|
 |
356a11 |
crm_info("Node %s is shutting down", this_node->details->uname);
|
|
 |
356a11 |
this_node->details->shutdown = TRUE;
|
|
 |
356a11 |
@@ -1017,18 +1017,18 @@ unpack_handle_remote_attrs(node_t *this_node, xmlNode *state, pe_working_set_t *
|
|
 |
356a11 |
}
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (crm_is_true(node_attribute_raw(this_node, "standby"))) {
|
|
 |
356a11 |
+ if (crm_is_true(pe_node_attribute_raw(this_node, "standby"))) {
|
|
 |
356a11 |
crm_info("Node %s is in standby-mode", this_node->details->uname);
|
|
 |
356a11 |
this_node->details->standby = TRUE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (crm_is_true(node_attribute_raw(this_node, "maintenance")) ||
|
|
 |
356a11 |
+ if (crm_is_true(pe_node_attribute_raw(this_node, "maintenance")) ||
|
|
 |
356a11 |
(rsc && !is_set(rsc->flags, pe_rsc_managed))) {
|
|
 |
356a11 |
crm_info("Node %s is in maintenance-mode", this_node->details->uname);
|
|
 |
356a11 |
this_node->details->maintenance = TRUE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- resource_discovery_enabled = node_attribute_raw(this_node, XML_NODE_ATTR_RSC_DISCOVERY);
|
|
 |
356a11 |
+ resource_discovery_enabled = pe_node_attribute_raw(this_node, XML_NODE_ATTR_RSC_DISCOVERY);
|
|
 |
356a11 |
if (resource_discovery_enabled && !crm_is_true(resource_discovery_enabled)) {
|
|
 |
356a11 |
if (is_baremetal_remote_node(this_node) && is_not_set(data_set->flags, pe_flag_stonith_enabled)) {
|
|
 |
356a11 |
crm_warn("ignoring %s attribute on baremetal remote node %s, disabling resource discovery requires stonith to be enabled.",
|
|
 |
356a11 |
@@ -1184,17 +1184,17 @@ unpack_status(xmlNode * status, pe_working_set_t * data_set)
|
|
 |
356a11 |
attrs = find_xml_node(state, XML_TAG_TRANSIENT_NODEATTRS, FALSE);
|
|
 |
356a11 |
add_node_attrs(attrs, this_node, TRUE, data_set);
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (crm_is_true(node_attribute_raw(this_node, "standby"))) {
|
|
 |
356a11 |
+ if (crm_is_true(pe_node_attribute_raw(this_node, "standby"))) {
|
|
 |
356a11 |
crm_info("Node %s is in standby-mode", this_node->details->uname);
|
|
 |
356a11 |
this_node->details->standby = TRUE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (crm_is_true(node_attribute_raw(this_node, "maintenance"))) {
|
|
 |
356a11 |
+ if (crm_is_true(pe_node_attribute_raw(this_node, "maintenance"))) {
|
|
 |
356a11 |
crm_info("Node %s is in maintenance-mode", this_node->details->uname);
|
|
 |
356a11 |
this_node->details->maintenance = TRUE;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- resource_discovery_enabled = node_attribute_raw(this_node, XML_NODE_ATTR_RSC_DISCOVERY);
|
|
 |
356a11 |
+ resource_discovery_enabled = pe_node_attribute_raw(this_node, XML_NODE_ATTR_RSC_DISCOVERY);
|
|
 |
356a11 |
if (resource_discovery_enabled && !crm_is_true(resource_discovery_enabled)) {
|
|
 |
356a11 |
crm_warn("ignoring %s attribute on node %s, disabling resource discovery is not allowed on cluster nodes",
|
|
 |
356a11 |
XML_NODE_ATTR_RSC_DISCOVERY, this_node->details->uname);
|
|
 |
356a11 |
@@ -1280,7 +1280,7 @@ determine_online_status_fencing(pe_working_set_t * data_set, xmlNode * node_stat
|
|
 |
356a11 |
const char *is_peer = crm_element_value(node_state, XML_NODE_IS_PEER);
|
|
 |
356a11 |
const char *in_cluster = crm_element_value(node_state, XML_NODE_IN_CLUSTER);
|
|
 |
356a11 |
const char *exp_state = crm_element_value(node_state, XML_NODE_EXPECTED);
|
|
 |
356a11 |
- const char *terminate = node_attribute_raw(this_node, "terminate");
|
|
 |
356a11 |
+ const char *terminate = pe_node_attribute_raw(this_node, "terminate");
|
|
 |
356a11 |
|
|
 |
356a11 |
/*
|
|
 |
356a11 |
- XML_NODE_IN_CLUSTER ::= true|false
|
|
 |
356a11 |
@@ -1454,7 +1454,7 @@ determine_online_status(xmlNode * node_state, node_t * this_node, pe_working_set
|
|
 |
356a11 |
|
|
 |
356a11 |
this_node->details->shutdown = FALSE;
|
|
 |
356a11 |
this_node->details->expected_up = FALSE;
|
|
 |
356a11 |
- shutdown = node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
356a11 |
+ shutdown = pe_node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (shutdown != NULL && safe_str_neq("0", shutdown)) {
|
|
 |
356a11 |
this_node->details->shutdown = TRUE;
|
|
 |
356a11 |
@@ -3286,8 +3286,8 @@ add_node_attrs(xmlNode * xml_obj, node_t * node, gboolean overwrite, pe_working_
|
|
 |
356a11 |
unpack_instance_attributes(data_set->input, xml_obj, XML_TAG_ATTR_SETS, NULL,
|
|
 |
356a11 |
node->details->attrs, NULL, overwrite, data_set->now);
|
|
 |
356a11 |
|
|
 |
356a11 |
- if (node_attribute_raw(node, "#site-name") == NULL) {
|
|
 |
356a11 |
- const char *site_name = node_attribute_raw(node, "site-name");
|
|
 |
356a11 |
+ if (pe_node_attribute_raw(node, "#site-name") == NULL) {
|
|
 |
356a11 |
+ const char *site_name = pe_node_attribute_raw(node, "site-name");
|
|
 |
356a11 |
|
|
 |
356a11 |
if (site_name) {
|
|
 |
356a11 |
/* Prefix '#' to the key */
|
|
 |
356a11 |
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
|
|
 |
356a11 |
index e2a845d..b58f05a 100644
|
|
 |
356a11 |
--- a/lib/pengine/utils.c
|
|
 |
356a11 |
+++ b/lib/pengine/utils.c
|
|
 |
356a11 |
@@ -1996,8 +1996,8 @@ fencing_action_digest_cmp(resource_t * rsc, node_t * node, pe_working_set_t * da
|
|
 |
356a11 |
char *key = generate_op_key(rsc->id, STONITH_DIGEST_TASK, 0);
|
|
 |
356a11 |
op_digest_cache_t *data = rsc_action_digest(rsc, STONITH_DIGEST_TASK, key, node, NULL, data_set);
|
|
 |
356a11 |
|
|
 |
356a11 |
- const char *digest_all = node_attribute_raw(node, CRM_ATTR_DIGESTS_ALL);
|
|
 |
356a11 |
- const char *digest_secure = node_attribute_raw(node, CRM_ATTR_DIGESTS_SECURE);
|
|
 |
356a11 |
+ const char *digest_all = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_ALL);
|
|
 |
356a11 |
+ const char *digest_secure = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_SECURE);
|
|
 |
356a11 |
|
|
 |
356a11 |
/* No 'reloads' for fencing device changes
|
|
 |
356a11 |
*
|
|
 |
356a11 |
diff --git a/pengine/allocate.c b/pengine/allocate.c
|
|
 |
356a11 |
index 2a80f32..62b141a 100644
|
|
 |
356a11 |
--- a/pengine/allocate.c
|
|
 |
356a11 |
+++ b/pengine/allocate.c
|
|
 |
356a11 |
@@ -899,7 +899,7 @@ probe_resources(pe_working_set_t * data_set)
|
|
 |
356a11 |
|
|
 |
356a11 |
for (GListPtr gIter = data_set->nodes; gIter != NULL; gIter = gIter->next) {
|
|
 |
356a11 |
node_t *node = (node_t *) gIter->data;
|
|
 |
356a11 |
- const char *probed = node_attribute_raw(node, CRM_OP_PROBED);
|
|
 |
356a11 |
+ const char *probed = pe_node_attribute_raw(node, CRM_OP_PROBED);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (is_container_remote_node(node)) {
|
|
 |
356a11 |
/* Guest node probes and their ordering requirements are now functional */
|
|
 |
356a11 |
diff --git a/pengine/constraints.c b/pengine/constraints.c
|
|
 |
356a11 |
index 9ee83af..aa204fe 100644
|
|
 |
356a11 |
--- a/pengine/constraints.c
|
|
 |
356a11 |
+++ b/pengine/constraints.c
|
|
 |
356a11 |
@@ -968,7 +968,7 @@ get_node_score(const char *rule, const char *score, gboolean raw, node_t * node,
|
|
 |
356a11 |
score_f = char2score(score);
|
|
 |
356a11 |
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
- const char *attr_score = node_attribute_calculated(node, score, rsc);
|
|
 |
356a11 |
+ const char *attr_score = pe_node_attribute_calculated(node, score, rsc);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (attr_score == NULL) {
|
|
 |
356a11 |
crm_debug("Rule %s: node %s did not have a value for %s",
|
|
 |
356a11 |
diff --git a/pengine/master.c b/pengine/master.c
|
|
 |
356a11 |
index 66a531f..ddb92bc 100644
|
|
 |
356a11 |
--- a/pengine/master.c
|
|
 |
356a11 |
+++ b/pengine/master.c
|
|
 |
356a11 |
@@ -511,7 +457,7 @@ master_score(resource_t * rsc, node_t * node, int not_set_value)
|
|
 |
356a11 |
attr_name = calloc(1, len);
|
|
 |
356a11 |
sprintf(attr_name, "master-%s", name);
|
|
 |
356a11 |
|
|
 |
356a11 |
- attr_value = node_attribute_calculated(node, attr_name, rsc);
|
|
 |
356a11 |
+ attr_value = pe_node_attribute_calculated(node, attr_name, rsc);
|
|
 |
356a11 |
if (attr_value != NULL) {
|
|
 |
356a11 |
score = char2score(attr_value);
|
|
 |
356a11 |
}
|
|
 |
356a11 |
@@ -984,10 +984,10 @@ node_hash_update_one(GHashTable * hash, node_t * other, const char *attr, int sc
|
|
 |
356a11 |
attr = "#" XML_ATTR_UNAME;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- value = node_attribute_raw(other, attr);
|
|
 |
356a11 |
+ value = pe_node_attribute_raw(other, attr);
|
|
 |
356a11 |
g_hash_table_iter_init(&iter, hash);
|
|
 |
356a11 |
while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) {
|
|
 |
356a11 |
- const char *tmp = node_attribute_raw(node, attr);
|
|
 |
356a11 |
+ const char *tmp = pe_node_attribute_raw(node, attr);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (safe_str_eq(value, tmp)) {
|
|
 |
356a11 |
crm_trace("%s: %d + %d", node->details->uname, node->weight, other->weight);
|
|
 |
356a11 |
diff --git a/pengine/native.c b/pengine/native.c
|
|
 |
356a11 |
index 08f4c8a..c87127f 100644
|
|
 |
356a11 |
--- a/pengine/native.c
|
|
 |
356a11 |
+++ b/pengine/native.c
|
|
 |
356a11 |
@@ -203,7 +203,7 @@ node_list_attr_score(GHashTable * list, const char *attr, const char *value)
|
|
 |
356a11 |
weight = -INFINITY;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
if (weight > best_score || best_node == NULL) {
|
|
 |
356a11 |
- const char *tmp = node_attribute_raw(node, attr);
|
|
 |
356a11 |
+ const char *tmp = pe_node_attribute_raw(node, attr);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (safe_str_eq(value, tmp)) {
|
|
 |
356a11 |
best_score = weight;
|
|
 |
356a11 |
@@ -241,7 +241,7 @@ node_hash_update(GHashTable * list1, GHashTable * list2, const char *attr, float
|
|
 |
356a11 |
CRM_LOG_ASSERT(node != NULL);
|
|
 |
356a11 |
if(node == NULL) { continue; };
|
|
 |
356a11 |
|
|
 |
356a11 |
- score = node_list_attr_score(list2, attr, node_attribute_raw(node, attr));
|
|
 |
356a11 |
+ score = node_list_attr_score(list2, attr, pe_node_attribute_raw(node, attr));
|
|
 |
356a11 |
new_score = merge_weights(factor * score, node->weight);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (factor < 0 && score < 0) {
|
|
 |
356a11 |
@@ -1640,8 +1640,8 @@ influence_priority(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation_t *
|
|
 |
356a11 |
return;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- lh_value = node_attribute_raw(rsc_lh->allocated_to, attribute);
|
|
 |
356a11 |
- rh_value = node_attribute_raw(rsc_rh->allocated_to, attribute);
|
|
 |
356a11 |
+ lh_value = pe_node_attribute_raw(rsc_lh->allocated_to, attribute);
|
|
 |
356a11 |
+ rh_value = pe_node_attribute_raw(rsc_rh->allocated_to, attribute);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (!safe_str_eq(lh_value, rh_value)) {
|
|
 |
356a11 |
if(constraint->score == INFINITY && constraint->role_lh == RSC_ROLE_MASTER) {
|
|
 |
356a11 |
@@ -1679,7 +1679,7 @@ colocation_match(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation_t * co
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
if (rsc_rh->allocated_to) {
|
|
 |
356a11 |
- value = node_attribute_raw(rsc_rh->allocated_to, attribute);
|
|
 |
356a11 |
+ value = pe_node_attribute_raw(rsc_rh->allocated_to, attribute);
|
|
 |
356a11 |
do_check = TRUE;
|
|
 |
356a11 |
|
|
 |
356a11 |
} else if (constraint->score < 0) {
|
|
 |
356a11 |
@@ -1693,7 +1693,7 @@ colocation_match(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation_t * co
|
|
 |
356a11 |
|
|
 |
356a11 |
g_hash_table_iter_init(&iter, work);
|
|
 |
356a11 |
while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) {
|
|
 |
356a11 |
- tmp = node_attribute_raw(node, attribute);
|
|
 |
356a11 |
+ tmp = pe_node_attribute_raw(node, attribute);
|
|
 |
356a11 |
if (do_check && safe_str_eq(tmp, value)) {
|
|
 |
356a11 |
if (constraint->score < INFINITY) {
|
|
 |
356a11 |
pe_rsc_trace(rsc_lh, "%s: %s.%s += %d", constraint->id, rsc_lh->id,
|
|
 |
356a11 |
@@ -2503,7 +2503,7 @@ StopRsc(resource_t * rsc, node_t * next, gboolean optional, pe_working_set_t * d
|
|
 |
356a11 |
|
|
 |
356a11 |
if(is_set(rsc->flags, pe_rsc_needs_unfencing)) {
|
|
 |
356a11 |
action_t *unfence = pe_fence_op(current, "on", TRUE, NULL, data_set);
|
|
 |
356a11 |
- const char *unfenced = node_attribute_raw(current, CRM_ATTR_UNFENCED);
|
|
 |
356a11 |
+ const char *unfenced = pe_node_attribute_raw(current, CRM_ATTR_UNFENCED);
|
|
 |
356a11 |
|
|
 |
356a11 |
order_actions(stop, unfence, pe_order_implies_first);
|
|
 |
356a11 |
if (unfenced == NULL || safe_str_eq("0", unfenced)) {
|
|
 |
356a11 |
@@ -2526,7 +2526,7 @@ StartRsc(resource_t * rsc, node_t * next, gboolean optional, pe_working_set_t *
|
|
 |
356a11 |
|
|
 |
356a11 |
if(is_set(rsc->flags, pe_rsc_needs_unfencing)) {
|
|
 |
356a11 |
action_t *unfence = pe_fence_op(next, "on", TRUE, NULL, data_set);
|
|
 |
356a11 |
- const char *unfenced = node_attribute_raw(next, CRM_ATTR_UNFENCED);
|
|
 |
356a11 |
+ const char *unfenced = pe_node_attribute_raw(next, CRM_ATTR_UNFENCED);
|
|
 |
356a11 |
|
|
 |
356a11 |
order_actions(unfence, start, pe_order_implies_then);
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/tools/crm_mon.c b/tools/crm_mon.c
|
|
 |
356a11 |
index cad468e..6a29115 100644
|
|
 |
356a11 |
--- a/tools/crm_mon.c
|
|
 |
356a11 |
+++ b/tools/crm_mon.c
|
|
 |
356a11 |
@@ -1726,7 +1726,7 @@ print_node_attribute(gpointer name, gpointer user_data)
|
|
 |
356a11 |
const char *value = NULL;
|
|
 |
356a11 |
struct mon_attr_data *data = (struct mon_attr_data *) user_data;
|
|
 |
356a11 |
|
|
 |
356a11 |
- value = node_attribute_raw(data->node, name);
|
|
 |
356a11 |
+ value = pe_node_attribute_raw(data->node, name);
|
|
 |
356a11 |
|
|
 |
356a11 |
/* Print attribute name and value */
|
|
 |
356a11 |
switch (output_format) {
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
From 1309e0ae0ab7bb7491c8c0e2149762b90bf45857 Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Thu, 28 Sep 2017 17:52:32 -0500
|
|
 |
356a11 |
Subject: [PATCH 4/6] Low: pengine: don't assert for nodes without unames
|
|
 |
356a11 |
|
|
 |
356a11 |
It's possible data_set->nodes has a node with only an ID.
|
|
 |
356a11 |
|
|
 |
356a11 |
This also has minor refactoring to avoid unnecessary memory allocation.
|
|
 |
356a11 |
---
|
|
 |
356a11 |
pengine/notif.c | 27 +++++++++++++++------------
|
|
 |
356a11 |
1 file changed, 15 insertions(+), 12 deletions(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/pengine/notif.c b/pengine/notif.c
|
|
 |
356a11 |
index 76c5a4a..39d8c72 100644
|
|
 |
356a11 |
--- a/pengine/notif.c
|
|
 |
356a11 |
+++ b/pengine/notif.c
|
|
 |
356a11 |
@@ -103,7 +103,9 @@ expand_node_list(GListPtr list, char **uname, char **metal)
|
|
 |
356a11 |
int existing_len = 0;
|
|
 |
356a11 |
node_t *node = (node_t *) gIter->data;
|
|
 |
356a11 |
|
|
 |
356a11 |
- CRM_ASSERT(node->details->uname);
|
|
 |
356a11 |
+ if (node->details->uname == NULL) {
|
|
 |
356a11 |
+ continue;
|
|
 |
356a11 |
+ }
|
|
 |
356a11 |
len = 2 + strlen(node->details->uname);
|
|
 |
356a11 |
|
|
 |
356a11 |
if(node_list) {
|
|
 |
356a11 |
@@ -125,7 +127,9 @@ expand_node_list(GListPtr list, char **uname, char **metal)
|
|
 |
356a11 |
node = node->details->remote_rsc->container->running_on->data;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- CRM_ASSERT(node->details->uname);
|
|
 |
356a11 |
+ if (node->details->uname == NULL) {
|
|
 |
356a11 |
+ continue;
|
|
 |
356a11 |
+ }
|
|
 |
356a11 |
len = 2 + strlen(node->details->uname);
|
|
 |
356a11 |
metal_list = realloc_safe(metal_list, len + existing_len);
|
|
 |
356a11 |
sprintf(metal_list + existing_len, "%s%s", existing_len == 0 ? "":" ", node->details->uname);
|
|
 |
356a11 |
@@ -532,6 +536,7 @@ expand_notification_data(resource_t *rsc, notify_data_t * n_data, pe_working_set
|
|
 |
356a11 |
char *rsc_list = NULL;
|
|
 |
356a11 |
char *node_list = NULL;
|
|
 |
356a11 |
char *metal_list = NULL;
|
|
 |
356a11 |
+ const char *source = NULL;
|
|
 |
356a11 |
GListPtr nodes = NULL;
|
|
 |
356a11 |
|
|
 |
356a11 |
if (n_data->stop) {
|
|
 |
356a11 |
@@ -609,17 +614,15 @@ expand_notification_data(resource_t *rsc, notify_data_t * n_data, pe_working_set
|
|
 |
356a11 |
g_hash_table_insert(n_data->keys, strdup("notify_available_uname"), node_list);
|
|
 |
356a11 |
g_list_free(nodes);
|
|
 |
356a11 |
|
|
 |
356a11 |
- expand_node_list(data_set->nodes, &node_list, &metal_list);
|
|
 |
356a11 |
- g_hash_table_insert(n_data->keys, strdup("notify_all_uname"), node_list);
|
|
 |
356a11 |
-
|
|
 |
356a11 |
- {
|
|
 |
356a11 |
- const char *source = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET);
|
|
 |
356a11 |
- if(safe_str_eq("host", source)) {
|
|
 |
356a11 |
- g_hash_table_insert(n_data->keys, strdup("notify_all_hosts"), metal_list);
|
|
 |
356a11 |
- } else {
|
|
 |
356a11 |
- free(metal_list);
|
|
 |
356a11 |
- }
|
|
 |
356a11 |
+ source = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET);
|
|
 |
356a11 |
+ if (safe_str_eq("host", source)) {
|
|
 |
356a11 |
+ expand_node_list(data_set->nodes, &node_list, &metal_list);
|
|
 |
356a11 |
+ g_hash_table_insert(n_data->keys, strdup("notify_all_hosts"),
|
|
 |
356a11 |
+ metal_list);
|
|
 |
356a11 |
+ } else {
|
|
 |
356a11 |
+ expand_node_list(data_set->nodes, &node_list, NULL);
|
|
 |
356a11 |
}
|
|
 |
356a11 |
+ g_hash_table_insert(n_data->keys, strdup("notify_all_uname"), node_list);
|
|
 |
356a11 |
|
|
 |
356a11 |
if (required && n_data->pre) {
|
|
 |
356a11 |
update_action_flags(n_data->pre, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
From 308387753ce8dd045a9c77fefc1ab2b36255c9bb Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Thu, 28 Sep 2017 17:54:40 -0500
|
|
 |
356a11 |
Subject: [PATCH 5/6] Low: pengine: don't move up to resource's parent if not
|
|
 |
356a11 |
start action
|
|
 |
356a11 |
|
|
 |
356a11 |
---
|
|
 |
356a11 |
pengine/graph.c | 9 ++++-----
|
|
 |
356a11 |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/pengine/graph.c b/pengine/graph.c
|
|
 |
356a11 |
index beaa077..8ee6aa8 100644
|
|
 |
356a11 |
--- a/pengine/graph.c
|
|
 |
356a11 |
+++ b/pengine/graph.c
|
|
 |
356a11 |
@@ -441,17 +441,16 @@ update_colo_start_chain(action_t *action)
|
|
 |
356a11 |
|
|
 |
356a11 |
if (is_not_set(action->flags, pe_action_runnable) && safe_str_eq(action->task, RSC_START)) {
|
|
 |
356a11 |
rsc = uber_parent(action->rsc);
|
|
 |
356a11 |
+ if (rsc->parent) {
|
|
 |
356a11 |
+ // This is a bundle (uber_parent() stops _before_ the bundle)
|
|
 |
356a11 |
+ rsc = rsc->parent;
|
|
 |
356a11 |
+ }
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
if (rsc == NULL || rsc->rsc_cons_lhs == NULL) {
|
|
 |
356a11 |
return;
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
- if(rsc->parent) {
|
|
 |
356a11 |
- /* uber_parent() stops _before_ the bundle */
|
|
 |
356a11 |
- rsc = rsc->parent;
|
|
 |
356a11 |
- }
|
|
 |
356a11 |
-
|
|
 |
356a11 |
/* if rsc has children, all the children need to have start set to
|
|
 |
356a11 |
* unrunnable before we follow the colo chain for the parent. */
|
|
 |
356a11 |
for (gIter = rsc->children; gIter != NULL; gIter = gIter->next) {
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|
|
 |
356a11 |
|
|
 |
356a11 |
From 39d1bc68a63122cc42b2dc87bed60653171dcacc Mon Sep 17 00:00:00 2001
|
|
 |
356a11 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
356a11 |
Date: Thu, 28 Sep 2017 18:03:04 -0500
|
|
 |
356a11 |
Subject: [PATCH 6/6] Low: tools: partially revert ccbdb2a2 to avoid
|
|
 |
356a11 |
attrd_updater needing libcrmcluster
|
|
 |
356a11 |
|
|
 |
356a11 |
Both approaches have drawbacks when used on remote nodes.
|
|
 |
356a11 |
|
|
 |
356a11 |
If we keep the get_local_node_name() calls, attrd_udpater needs libcrmcluster,
|
|
 |
356a11 |
which shouldn't be required on remote nodes. Also, on a corosync cluster for
|
|
 |
356a11 |
example, the call on a remote node will spend 10+ seconds trying to connect to
|
|
 |
356a11 |
corosync before finally using uname, which will be incorrect for remote nodes
|
|
 |
356a11 |
whose name known to the cluster is not the same as uname.
|
|
 |
356a11 |
|
|
 |
356a11 |
If we avoid get_local_node_name() (the approach here), there is not a clear way
|
|
 |
356a11 |
to distinguish a query with a NULL node name meaning "let the remote proxy
|
|
 |
356a11 |
callback add the name" from "query all nodes". However, this likely exists
|
|
 |
356a11 |
already, and should be addressed separately.
|
|
 |
356a11 |
---
|
|
 |
356a11 |
pacemaker.spec.in | 4 +---
|
|
 |
356a11 |
tools/Makefile.am | 2 +-
|
|
 |
356a11 |
tools/attrd_updater.c | 7 -------
|
|
 |
356a11 |
3 files changed, 2 insertions(+), 11 deletions(-)
|
|
 |
356a11 |
|
|
 |
356a11 |
diff --git a/pacemaker.spec.in b/pacemaker.spec.in
|
|
 |
356a11 |
index d0bc2c3..642af74 100644
|
|
 |
356a11 |
--- a/pacemaker.spec.in
|
|
 |
356a11 |
+++ b/pacemaker.spec.in
|
|
 |
356a11 |
@@ -601,7 +601,6 @@ exit 0
|
|
 |
356a11 |
%exclude %{_sbindir}/pacemaker_remoted
|
|
 |
356a11 |
%{_libexecdir}/pacemaker/*
|
|
 |
356a11 |
|
|
 |
356a11 |
-%{_sbindir}/attrd_updater
|
|
 |
356a11 |
%{_sbindir}/crm_attribute
|
|
 |
356a11 |
%{_sbindir}/crm_master
|
|
 |
356a11 |
%{_sbindir}/crm_node
|
|
 |
356a11 |
@@ -620,7 +619,6 @@ exit 0
|
|
 |
356a11 |
%doc %{_mandir}/man7/ocf_pacemaker_o2cb.*
|
|
 |
356a11 |
%doc %{_mandir}/man7/ocf_pacemaker_remote.*
|
|
 |
356a11 |
%doc %{_mandir}/man8/crm_attribute.*
|
|
 |
356a11 |
-%doc %{_mandir}/man8/attrd_updater.*
|
|
 |
356a11 |
%doc %{_mandir}/man8/crm_node.*
|
|
 |
356a11 |
%doc %{_mandir}/man8/crm_master.*
|
|
 |
356a11 |
%if %{with cman}
|
|
 |
356a11 |
@@ -670,6 +668,7 @@ exit 0
|
|
 |
356a11 |
%config(noreplace) %{_sysconfdir}/init/crm_mon.conf
|
|
 |
356a11 |
%endif
|
|
 |
356a11 |
|
|
 |
356a11 |
+%{_sbindir}/attrd_updater
|
|
 |
356a11 |
%{_sbindir}/cibadmin
|
|
 |
356a11 |
%{_sbindir}/crm_diff
|
|
 |
356a11 |
%{_sbindir}/crm_error
|
|
 |
356a11 |
@@ -705,7 +704,6 @@ exit 0
|
|
 |
356a11 |
%exclude %{_mandir}/man7/ocf_pacemaker_o2cb.*
|
|
 |
356a11 |
%exclude %{_mandir}/man7/ocf_pacemaker_remote.*
|
|
 |
356a11 |
%doc %{_mandir}/man8/*
|
|
 |
356a11 |
-%exclude %{_mandir}/man8/attrd_updater.*
|
|
 |
356a11 |
%exclude %{_mandir}/man8/crm_attribute.*
|
|
 |
356a11 |
%exclude %{_mandir}/man8/crm_node.*
|
|
 |
356a11 |
%exclude %{_mandir}/man8/crm_master.*
|
|
 |
356a11 |
diff --git a/tools/Makefile.am b/tools/Makefile.am
|
|
 |
356a11 |
index a601b8d..3548035 100644
|
|
 |
356a11 |
--- a/tools/Makefile.am
|
|
 |
356a11 |
+++ b/tools/Makefile.am
|
|
 |
356a11 |
@@ -121,7 +121,7 @@ iso8601_SOURCES = test.iso8601.c
|
|
 |
356a11 |
iso8601_LDADD = $(COMMONLIBS)
|
|
 |
356a11 |
|
|
 |
356a11 |
attrd_updater_SOURCES = attrd_updater.c
|
|
 |
356a11 |
-attrd_updater_LDADD = $(top_builddir)/lib/cluster/libcrmcluster.la $(COMMONLIBS)
|
|
 |
356a11 |
+attrd_updater_LDADD = $(COMMONLIBS)
|
|
 |
356a11 |
|
|
 |
356a11 |
crm_ticket_SOURCES = crm_ticket.c
|
|
 |
356a11 |
crm_ticket_LDADD = $(top_builddir)/lib/pengine/libpe_rules.la \
|
|
 |
356a11 |
diff --git a/tools/attrd_updater.c b/tools/attrd_updater.c
|
|
 |
356a11 |
index 5e8b837..1da166b 100644
|
|
 |
356a11 |
--- a/tools/attrd_updater.c
|
|
 |
356a11 |
+++ b/tools/attrd_updater.c
|
|
 |
356a11 |
@@ -32,7 +32,6 @@
|
|
 |
356a11 |
#include <crm/common/ipc.h>
|
|
 |
356a11 |
|
|
 |
356a11 |
#include <crm/attrd.h>
|
|
 |
356a11 |
-#include <crm/cluster.h>
|
|
 |
356a11 |
|
|
 |
356a11 |
/* *INDENT-OFF* */
|
|
 |
356a11 |
static struct crm_option long_options[] = {
|
|
 |
356a11 |
@@ -201,9 +200,6 @@ main(int argc, char **argv)
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
|
|
 |
356a11 |
attr_node = attrd_get_target(attr_node);
|
|
 |
356a11 |
- if (attr_node == NULL) {
|
|
 |
356a11 |
- attr_node = get_local_node_name();
|
|
 |
356a11 |
- }
|
|
 |
356a11 |
crm_exit(do_update(command, attr_node, attr_name, attr_value,
|
|
 |
356a11 |
attr_section, attr_set, attr_dampen, attr_options));
|
|
 |
356a11 |
}
|
|
 |
356a11 |
@@ -354,9 +350,6 @@ do_query(const char *attr_name, const char *attr_node, gboolean query_all)
|
|
 |
356a11 |
attr_node = NULL;
|
|
 |
356a11 |
} else {
|
|
 |
356a11 |
attr_node = attrd_get_target(attr_node);
|
|
 |
356a11 |
- if (attr_node == NULL) {
|
|
 |
356a11 |
- attr_node = get_local_node_name();
|
|
 |
356a11 |
- }
|
|
 |
356a11 |
}
|
|
 |
356a11 |
|
|
 |
356a11 |
/* Build and send attrd request, and get XML reply */
|
|
 |
356a11 |
--
|
|
 |
356a11 |
1.8.3.1
|
|
 |
356a11 |
|