Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pacemaker.32860
0001-Fix-scheduler-don-t-show-pending-nodes-as-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-scheduler-don-t-show-pending-nodes-as-having-3.1.patch of Package pacemaker.32860
From 585f08412797a5a80a71fe19e52294290fbb41f4 Mon Sep 17 00:00:00 2001 From: Ken Gaillot <kgaillot@redhat.com> Date: Wed, 25 Oct 2023 08:57:21 -0500 Subject: [PATCH] Fix: scheduler: don't show pending nodes as having "<3.15.1" feature set When a node's controller completes the join process, it sets the #feature-set node attribute, which is used in status displays to detect mixed-version clusters. Previously, the status displays used "<3.15.1" if the node was online (joined at the cluster layer) but had no #feature-set attribute. However, this will also be the case when the node is pending (coming up between when it has joined the cluster layer and completed the join process, and going down between when it has left the controller group and the cluster layer). Now, show "<3.15.1" only if the node has completed the join process. --- lib/pengine/pe_output.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) Index: pacemaker-2.1.5+20221208.a3f44794f/lib/pengine/pe_output.c =================================================================== --- pacemaker-2.1.5+20221208.a3f44794f.orig/lib/pengine/pe_output.c +++ pacemaker-2.1.5+20221208.a3f44794f/lib/pengine/pe_output.c @@ -309,20 +309,31 @@ resource_history_string(pe_resource_t *r return buf; } +/*! + * \internal + * \brief Get a node's feature set for status display purposes + * + * \param[in] node Node to check + * + * \return String representation of feature set if the node is fully up (using + * "<3.15.1" for older nodes that don't set the #feature-set attribute), + * otherwise NULL + */ static const char * -get_node_feature_set(pe_node_t *node) { - const char *feature_set = NULL; +get_node_feature_set(const pe_node_t *node) +{ + if (node->details->online && node->details->expected_up + && !pe__is_guest_or_remote_node(node)) { - if (node->details->online && !pe__is_guest_or_remote_node(node)) { - feature_set = g_hash_table_lookup(node->details->attrs, - CRM_ATTR_FEATURE_SET); - /* The feature set attribute is present since 3.15.1. If it is missing - * then the node must be running an earlier version. */ - if (feature_set == NULL) { - feature_set = "<3.15.1"; - } + const char *feature_set = g_hash_table_lookup(node->details->attrs, + CRM_ATTR_FEATURE_SET); + + /* The feature set attribute is present since 3.15.1. If it is missing, + * then the node must be running an earlier version. + */ + return pcmk__s(feature_set, "<3.15.1"); } - return feature_set; + return NULL; } static bool
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