Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
pacemaker.9173
bug-967775_pacemaker-libcib-determine-node-type...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-967775_pacemaker-libcib-determine-node-type.patch of Package pacemaker.9173
commit 163157ff6d313c86c556c303c16a6ec7df369370 Author: Gao,Yan <ygao@suse.com> Date: Thu Mar 3 19:48:08 2016 +0100 Fix: libcib: Correctly determine the node type Previously, if a remote node already existed under /cib/configuration/nodes/, query_node_uuid() would return *is_remote_node = FALSE for it though. diff --git a/lib/cib/cib_attrs.c b/lib/cib/cib_attrs.c index e164632..d929fa2 100644 --- a/lib/cib/cib_attrs.c +++ b/lib/cib/cib_attrs.c @@ -484,6 +484,12 @@ get_cluster_node_uuid(cib_t * the_cib, const char *uname, char **uuid) for (a_child = __xml_first_child(xml_obj); a_child != NULL; a_child = __xml_next(a_child)) { if (crm_str_eq((const char *)a_child->name, XML_CIB_TAG_NODE, TRUE)) { + const char *node_type = crm_element_value(a_child, XML_ATTR_TYPE); + /* Only if it's a cluster node */ + if (safe_str_eq(node_type, "remote")) { + continue; + } + child_name = crm_element_value(a_child, XML_ATTR_UNAME); if (safe_str_eq(uname, child_name)) { child_name = ID(a_child); @@ -508,6 +514,10 @@ query_node_uuid(cib_t * the_cib, const char *uname, char **uuid, int *is_remote_ CRM_ASSERT(uname != NULL); CRM_ASSERT(uuid != NULL); + if (is_remote_node) { + *is_remote_node = FALSE; + } + rc = get_cluster_node_uuid(the_cib, uname, uuid); if (rc != pcmk_ok) { crm_debug("%s is not a cluster node, checking to see if remote-node", uname);
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