Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yukoff:openSUSE:Leap:42.1:Backports
pacemaker.4956
pacemaker-attrd-mass-removal-node-attributes.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-attrd-mass-removal-node-attributes.patch of Package pacemaker.4956
commit da17fd0265ffe3b4456c4f81141439c851504281 Author: Andrew Beekhof <andrew@beekhof.net> Date: Thu Jan 7 11:33:34 2016 +1100 Fix: attrd: Correctly implement mass removal of a node's attributes diff --git a/attrd/commands.c b/attrd/commands.c index 378a4f8..28e4a81 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -541,8 +541,9 @@ attrd_peer_message(crm_node_t *peer, xmlNode *xml) } else { host = NULL; } - attrd_peer_remove(host_id, host, TRUE, peer->uname); + crm_notice("Processing %s from %s: %s %u", op, peer->uname, host, host_id); + attrd_peer_remove(host_id, host, TRUE, peer->uname); } else if (safe_str_eq(op, ATTRD_OP_SYNC_RESPONSE) && safe_str_neq(peer->uname, attrd_cluster->uname)) { @@ -589,15 +590,27 @@ attrd_peer_remove(uint32_t nodeid, const char *host, gboolean uncache, const cha attribute_t *a = NULL; GHashTableIter aIter; - crm_notice("Removing all %s attributes for %s", host, source); + crm_notice("Removing all %s (%u) attributes for %s", host, nodeid, source); if(host == NULL) { return; } g_hash_table_iter_init(&aIter, attributes); while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) { - if(g_hash_table_remove(a->values, host)) { - crm_debug("Removed %s[%s] for %s", a->id, host, source); + attribute_value_t *v = g_hash_table_lookup(a->values, host); + + if(v && v->current) { + free(v->current); + v->current = NULL; + a->changed = TRUE; + + crm_debug("Removed %s[%s]=%s for %s", a->id, host, v->current, source); + if(a->timer) { + crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id); + mainloop_timer_start(a->timer); + } else { + write_or_elect_attribute(a); + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor