Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
sbd.27493
bsc#1204319-0002-Log-sbd-inquisitor-log-a-warni...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1204319-0002-Log-sbd-inquisitor-log-a-warning-if-SBD_PACEMAKER-is.patch of Package sbd.27493
From ac1cfbbcf99d446c24e8d0eb1ed37092453b8a83 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" <ygao@suse.com> Date: Wed, 23 Nov 2022 12:27:36 +0100 Subject: [PATCH 2/4] Log: sbd-inquisitor: log a warning if SBD_PACEMAKER is overridden by -P or -PP option --- src/sbd-inquisitor.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c index 3e28bb8..aff1273 100644 --- a/src/sbd-inquisitor.c +++ b/src/sbd-inquisitor.c @@ -25,6 +25,7 @@ static struct servants_list_item *servants_leader = NULL; int disk_priority = 1; int check_pcmk = 1; int check_cluster = 1; +int has_check_pcmk_env = false; int disk_count = 0; int servant_count = 0; int servant_restart_interval = 5; @@ -949,6 +950,8 @@ int main(int argc, char **argv, char **envp) if(value) { check_pcmk = crm_is_true(value); check_cluster = crm_is_true(value); + + has_check_pcmk_env = true; } cl_log(LOG_INFO, "SBD_PACEMAKER set to: %d (%s)", (int)check_pcmk, value?value:"default"); @@ -1202,7 +1205,17 @@ int main(int argc, char **argv, char **envp) } if (P_count > 0) { - check_pcmk = arg_enabled(P_count); + int check_pcmk_arg = arg_enabled(P_count); + + if (has_check_pcmk_env && check_pcmk_arg != check_pcmk) { + cl_log(LOG_WARNING, "Pacemaker integration is %s: " + "SBD_PACEMAKER=%s is overridden by %s option. " + "It's recommended to only use SBD_PACEMAKER.", + check_pcmk_arg? "enabled" : "disabled", + check_pcmk? "yes" : "no", + check_pcmk_arg? "-P" : "-PP"); + } + check_pcmk = check_pcmk_arg; } if ((disk_count > 0) && (strlen(local_uname) > SECTOR_NAME_MAX)) { -- 2.35.3
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