Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
pacemaker.22682
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.22682
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 PCMK__XA_ATTR_NODE_NAME 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.4+20200616.2deceaa3a/lib/lrmd/proxy_common.c =================================================================== --- pacemaker-2.0.4+20200616.2deceaa3a.orig/lib/lrmd/proxy_common.c +++ pacemaker-2.0.4+20200616.2deceaa3a/lib/lrmd/proxy_common.c @@ -255,11 +255,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, PCMK__XA_TASK); int rc = 0; if (safe_str_eq(type, T_ATTRD) && crm_element_value(request, - PCMK__XA_ATTR_NODE_NAME) == NULL) { + PCMK__XA_ATTR_NODE_NAME) == NULL + && (safe_str_eq(task, PCMK__ATTRD_CMD_UPDATE) + || safe_str_eq(task, PCMK__ATTRD_CMD_UPDATE_BOTH) + || safe_str_eq(task, PCMK__ATTRD_CMD_UPDATE_DELAY))) { crm_xml_add(request, PCMK__XA_ATTR_NODE_NAME, 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