Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
pacemaker.8397
pacemaker-crmd-dont-need-return-value-from-proc...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-crmd-dont-need-return-value-from-process_graph_event.patch of Package pacemaker.8397
commit 9db1f32913edfeffb934b0f6267d009ce0a74b64 Author: Ken Gaillot <kgaillot@redhat.com> Date: Mon Feb 26 14:48:57 2018 -0600 Refactor: crmd: don't need return value from process_graph_event() diff --git a/crmd/te_events.c b/crmd/te_events.c index 26389b9af..7f470db47 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -437,8 +437,8 @@ match_down_event(const char *target, bool quiet) return match; } -gboolean -process_graph_event(xmlNode * event, const char *event_node) +void +process_graph_event(xmlNode *event, const char *event_node) { int rc = -1; int status = -1; @@ -451,7 +451,6 @@ process_graph_event(xmlNode * event, const char *event_node) int transition_num = -1; char *update_te_uuid = NULL; - gboolean stop_early = FALSE; gboolean ignore_failures = FALSE; const char *id = NULL; const char *desc = NULL; @@ -471,14 +470,14 @@ process_graph_event(xmlNode * event, const char *event_node) magic = crm_element_value(event, XML_ATTR_TRANSITION_KEY); if (magic == NULL) { /* non-change */ - return FALSE; + return; } if (decode_transition_key(magic, &update_te_uuid, &transition_num, &action_num, &target_rc) == FALSE) { crm_err("Invalid event %s.%d detected: %s", id, callid, magic); abort_transition(INFINITY, tg_restart, "Bad event", event); - return FALSE; + return; } if (status == PCMK_LRM_OP_PENDING) { @@ -492,12 +491,10 @@ process_graph_event(xmlNode * event, const char *event_node) } else if ((action_num < 0) || (crm_str_eq(update_te_uuid, te_uuid, TRUE) == FALSE)) { desc = "initiated by a different node"; abort_transition(INFINITY, tg_restart, "Foreign event", event); - stop_early = TRUE; /* This could be an lrm status refresh */ } else if (transition_graph->id != transition_num) { desc = "arrived really late"; abort_transition(INFINITY, tg_restart, "Old event", event); - stop_early = TRUE; /* This could be an lrm status refresh */ } else if (transition_graph->complete) { desc = "arrived late"; @@ -522,8 +519,6 @@ process_graph_event(xmlNode * event, const char *event_node) } else { if (update_failcount(event, event_node, rc, target_rc, (transition_num == -1), ignore_failures)) { - /* Turns out this wasn't an lrm status refresh update afterall */ - stop_early = FALSE; desc = "failed"; } crm_info("Detected action (%d.%d) %s.%d=%s: %s", transition_num, @@ -532,5 +527,4 @@ process_graph_event(xmlNode * event, const char *event_node) bail: free(update_te_uuid); - return stop_early; } diff --git a/crmd/tengine.h b/crmd/tengine.h index 80e906de4..838f518f3 100644 --- a/crmd/tengine.h +++ b/crmd/tengine.h @@ -38,7 +38,7 @@ extern crm_action_t *get_cancel_action(const char *id, const char *node); extern gboolean cib_action_update(crm_action_t * action, int status, int op_rc); extern gboolean fail_incompletable_actions(crm_graph_t * graph, const char *down_node); -extern gboolean process_graph_event(xmlNode * event, const char *event_node); +void process_graph_event(xmlNode *event, const char *event_node); /* utils */ extern crm_action_t *get_action(int id, gboolean confirmed);
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