Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix: execd: Allow the SBD check to be explicitly disabled for bundles
- Loading branch information
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1599,6 +1599,8 @@ process_lrmd_get_recurring(xmlNode *request, int call_id) | |
| return reply; | ||
| } | ||
|
|
||
| static bool sbd_check_logged = FALSE; | ||
|
|
||
| void | ||
| process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) | ||
| { | ||
|
|
@@ -1644,10 +1646,19 @@ process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) | |
| do_notify = 1; | ||
| do_reply = 1; | ||
| } else if (crm_str_eq(op, LRMD_OP_CHECK, TRUE)) { | ||
| xmlNode *data = get_message_xml(request, F_LRMD_CALLDATA); | ||
| const char *timeout = crm_element_value(data, F_LRMD_WATCHDOG); | ||
| CRM_LOG_ASSERT(data != NULL); | ||
| check_sbd_timeout(timeout); | ||
| if(disable_sbd_check) { | ||
| if(sbd_check_logged == FALSE) { | ||
| crm_warn("Explicitly ignoring SBD check, this is only safe inside bundles"); | ||
| sbd_check_logged = TRUE; | ||
| } | ||
|
|
||
| } else { | ||
| xmlNode *data = get_message_xml(request, F_LRMD_CALLDATA); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jnpkrn
Contributor
|
||
| const char *timeout = crm_element_value(data, F_LRMD_WATCHDOG); | ||
| CRM_LOG_ASSERT(data != NULL); | ||
| check_sbd_timeout(timeout); | ||
| } | ||
|
|
||
| } else if (crm_str_eq(op, LRMD_OP_ALERT_EXEC, TRUE)) { | ||
| rc = process_lrmd_alert_exec(client, id, request); | ||
| do_reply = 1; | ||
|
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please, make sure you have
blank-at-eoland/ortrailing-spaceset forcore.whitespaceconfiguration variable of git, so that you can check(e.g.,
git showifcolor.diff.whitespaceis also suitably configured) youare not introducing new white space issues.