Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:Update
pacemaker.19271
rh#1907726-0001-Fix-liblrmd-Limit-node-name-add...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rh#1907726-0001-Fix-liblrmd-Limit-node-name-addition-to-proxied-attr.patch of Package pacemaker.19271
From c3e2edb78e6d0b6ffc8acbe8fc7caef058b35d76 Mon Sep 17 00:00:00 2001 From: Reid Wahl <nrwahl@protonmail.com> Date: Tue, 22 Dec 2020 22:28:46 -0800 Subject: [PATCH] Fix: liblrmd: Limit node name addition to proxied attrd update commands remote_proxy_cb() currently adds the remote node's name as F_ATTRD_HOST if that attribute is not explicitly set. This is necessary for attrd update commands. For those, lack of an explicit node name means to use the local node. Since requests are proxied to full nodes, the node hosting the remote resource would be incorrectly treated as the "local node", causing the attribute to be updated for the wrong node. However, for other commands, this is not the case. Lack of an explicit node name can mean "all nodes" (as for CLEAR_FAILURE and QUERY), or a node name may be ignored (as for REFRESH). In these cases (the non-update commands), we don't want to add a node name automatically if it's not explicitly set. Resolves: RHBZ#1907726 Signed-off-by: Reid Wahl <nrwahl@protonmail.com> --- lib/lrmd/proxy_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: pacemaker-2.0.1+20190417.13d370ca9/lib/lrmd/proxy_common.c =================================================================== --- pacemaker-2.0.1+20190417.13d370ca9.orig/lib/lrmd/proxy_common.c +++ pacemaker-2.0.1+20190417.13d370ca9/lib/lrmd/proxy_common.c @@ -252,10 +252,15 @@ remote_proxy_cb(lrmd_t *lrmd, const char if(is_set(flags, crm_ipc_proxied)) { const char *type = crm_element_value(request, F_TYPE); + const char *task = crm_element_value(request, F_ATTRD_TASK); int rc = 0; if (safe_str_eq(type, T_ATTRD) - && crm_element_value(request, F_ATTRD_HOST) == NULL) { + && crm_element_value(request, + F_ATTRD_HOST) == NULL + && (safe_str_eq(task, ATTRD_OP_UPDATE) + || safe_str_eq(task, ATTRD_OP_UPDATE_BOTH) + || safe_str_eq(task, ATTRD_OP_UPDATE_DELAY))) { crm_xml_add(request, F_ATTRD_HOST, proxy->node_name); }
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