Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
pacemaker.26929
pacemaker-crmd-improve-messages-when-a-node-is-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-crmd-improve-messages-when-a-node-is-unexpectedly-lost.patch of Package pacemaker.26929
commit 35dd8807e4fb2ac808b8f6b3c91c6fa3e56be8e9 Author: Ken Gaillot <kgaillot@redhat.com> Date: Tue Apr 17 11:05:00 2018 -0500 Log: crmd: improve messages when a node is unexpectedly lost Previously, it would log a warning and a notice for the same event. Now, it logs a single warning, and the code is simpler. Index: pacemaker-1.1.19+20180725.2ad12d3cb/crmd/callbacks.c =================================================================== --- pacemaker-1.1.19+20180725.2ad12d3cb.orig/crmd/callbacks.c +++ pacemaker-1.1.19+20180725.2ad12d3cb/crmd/callbacks.c @@ -1,19 +1,8 @@ /* - * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net> + * Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net> * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include <crm_internal.h> @@ -208,7 +197,7 @@ peer_update_callback(enum crm_status_typ xmlNode *update = NULL; int flags = node_update_peer; gboolean alive = is_remote? appeared : crm_is_peer_active(node); - crm_action_t *down = match_down_event(node->uuid, appeared); + crm_action_t *down = match_down_event(node->uuid); crm_trace("Alive=%d, appeared=%d, down=%d", alive, appeared, (down? down->id : -1)); @@ -248,13 +237,12 @@ peer_update_callback(enum crm_status_typ } } else if (appeared == FALSE) { - crm_notice("Stonith/shutdown of %s not matched", node->uname); - + crm_warn("Stonith/shutdown of node %s was not expected", + node->uname); if (!is_remote) { crm_update_peer_join(__FUNCTION__, node, crm_join_none); check_join_state(fsa_state, __FUNCTION__); } - abort_transition(INFINITY, tg_restart, "Node failure", NULL); fail_incompletable_actions(transition_graph, node->uuid); Index: pacemaker-1.1.19+20180725.2ad12d3cb/crmd/te_callbacks.c =================================================================== --- pacemaker-1.1.19+20180725.2ad12d3cb.orig/crmd/te_callbacks.c +++ pacemaker-1.1.19+20180725.2ad12d3cb/crmd/te_callbacks.c @@ -1,19 +1,8 @@ /* - * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net> + * Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net> * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include <crm_internal.h> @@ -349,7 +338,7 @@ abort_unless_down(const char *xpath, con return; } - down = match_down_event(node_uuid, TRUE); + down = match_down_event(node_uuid); if (down == NULL) { crm_trace("Not expecting %s to be down (%s)", node_uuid, xpath); abort_transition(INFINITY, tg_restart, reason, change); Index: pacemaker-1.1.19+20180725.2ad12d3cb/crmd/te_events.c =================================================================== --- pacemaker-1.1.19+20180725.2ad12d3cb.orig/crmd/te_events.c +++ pacemaker-1.1.19+20180725.2ad12d3cb/crmd/te_events.c @@ -390,12 +379,11 @@ get_cancel_action(const char *id, const * \brief Find a transition event that would have made a specified node down * * \param[in] target UUID of node to match - * \param[in] quiet If FALSE, log a warning if no match found * * \return Matching event if found, NULL otherwise */ crm_action_t * -match_down_event(const char *target, bool quiet) +match_down_event(const char *target) { crm_action_t *match = NULL; xmlXPathObjectPtr xpath_ret = NULL; @@ -428,15 +416,11 @@ match_down_event(const char *target, boo free(xpath); if (match != NULL) { - crm_debug("Shutdown action found for node %s: action %d (%s)", - target, match->id, - crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY)); - + crm_debug("Shutdown action %d (%s) found for node %s", match->id, + crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY), target); } else { - do_crm_log((quiet? LOG_DEBUG : LOG_WARNING), - "No reason to expect node %s to be down", target); + crm_debug("No reason to expect node %s to be down", target); } - return match; } Index: pacemaker-1.1.19+20180725.2ad12d3cb/crmd/tengine.h =================================================================== --- pacemaker-1.1.19+20180725.2ad12d3cb.orig/crmd/tengine.h +++ pacemaker-1.1.19+20180725.2ad12d3cb/crmd/tengine.h @@ -1,20 +1,10 @@ /* - * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net> + * Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net> * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ + #ifndef TENGINE__H # define TENGINE__H @@ -33,7 +23,7 @@ void purge_stonith_cleanup(void); void execute_stonith_cleanup(void); /* tengine */ -extern crm_action_t *match_down_event(const char *target, bool quiet); +extern crm_action_t *match_down_event(const char *target); extern crm_action_t *get_cancel_action(const char *id, const char *node); void controld_record_action_timeout(crm_action_t *action);
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