Add a patch to fix several default parameters for message queues
Resolves: rhbz#1205696
This commit is contained in:
parent
dfbc918c33
commit
ee59aa4b81
99
rsyslog-8.10.0-resetconfigvariables.patch
Normal file
99
rsyslog-8.10.0-resetconfigvariables.patch
Normal file
@ -0,0 +1,99 @@
|
||||
From 4f6456f536076b32802959506389cf69f2b08d03 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Heinrich <theinric@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 18:20:54 +0200
|
||||
Subject: [PATCH 2/4] Harmonize resetConfigVariables values and defaults
|
||||
|
||||
Default values for several global and main message queue parameters
|
||||
were defined in two places which, over time, became inconsistent.
|
||||
This merges the code used in resetConfigVariables and the rsconf_t
|
||||
constructor. In cases where values for the same parameter differed,
|
||||
the value with a more recent commit timestamp was used.
|
||||
---
|
||||
runtime/rsconf.c | 49 ++++++++++++++++---------------------------------
|
||||
1 file changed, 16 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
|
||||
index d6e0bdf..c5b6132 100644
|
||||
--- a/runtime/rsconf.c
|
||||
+++ b/runtime/rsconf.c
|
||||
@@ -122,9 +122,10 @@ static struct cnfparamblk parserpblk =
|
||||
/* forward-definitions */
|
||||
void cnfDoCfsysline(char *ln);
|
||||
|
||||
-/* Standard-Constructor
|
||||
- */
|
||||
-BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macro! */
|
||||
+void cnfSetDefaults(rsconf_t *pThis)
|
||||
+{
|
||||
+ pThis->globals.bAbortOnUncleanConfig = 0;
|
||||
+ pThis->globals.bReduceRepeatMsgs = 0;
|
||||
pThis->globals.bDebugPrintTemplateList = 1;
|
||||
pThis->globals.bDebugPrintModuleList = 0;
|
||||
pThis->globals.bDebugPrintCfSysLineHandlerList = 0;
|
||||
@@ -135,9 +136,6 @@ BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macr
|
||||
pThis->templates.last = NULL;
|
||||
pThis->templates.lastStatic = NULL;
|
||||
pThis->actions.nbrActions = 0;
|
||||
- lookupInitCnf(&pThis->lu_tabs);
|
||||
- CHKiRet(llInit(&pThis->rulesets.llRulesets, rulesetDestructForLinkedList,
|
||||
- rulesetKeyDestruct, strcasecmp));
|
||||
/* queue params */
|
||||
pThis->globals.mainQ.iMainMsgQueueSize = 100000;
|
||||
pThis->globals.mainQ.iMainMsgQHighWtrMark = 80000;
|
||||
@@ -161,7 +159,16 @@ BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macr
|
||||
pThis->globals.mainQ.bMainMsgQSaveOnShutdown = 1;
|
||||
pThis->globals.mainQ.iMainMsgQueueDeqtWinFromHr = 0;
|
||||
pThis->globals.mainQ.iMainMsgQueueDeqtWinToHr = 25;
|
||||
- /* end queue params */
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Standard-Constructor
|
||||
+ */
|
||||
+BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macro! */
|
||||
+ cnfSetDefaults(pThis);
|
||||
+ lookupInitCnf(&pThis->lu_tabs);
|
||||
+ CHKiRet(llInit(&pThis->rulesets.llRulesets, rulesetDestructForLinkedList,
|
||||
+ rulesetKeyDestruct, strcasecmp));
|
||||
finalize_it:
|
||||
ENDobjConstruct(rsconf)
|
||||
|
||||
@@ -967,33 +974,9 @@ finalize_it:
|
||||
/* legacy config system: reset config variables to default values. */
|
||||
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
|
||||
{
|
||||
- loadConf->globals.bLogStatusMsgs = DFLT_bLogStatusMsgs;
|
||||
- loadConf->globals.bDebugPrintTemplateList = 1;
|
||||
- loadConf->globals.bDebugPrintCfSysLineHandlerList = 1;
|
||||
- loadConf->globals.bDebugPrintModuleList = 1;
|
||||
- loadConf->globals.bAbortOnUncleanConfig = 0;
|
||||
- loadConf->globals.bReduceRepeatMsgs = 0;
|
||||
free(loadConf->globals.mainQ.pszMainMsgQFName);
|
||||
- loadConf->globals.mainQ.pszMainMsgQFName = NULL;
|
||||
- loadConf->globals.mainQ.iMainMsgQueueSize = 10000;
|
||||
- loadConf->globals.mainQ.iMainMsgQHighWtrMark = 8000;
|
||||
- loadConf->globals.mainQ.iMainMsgQLowWtrMark = 2000;
|
||||
- loadConf->globals.mainQ.iMainMsgQDiscardMark = 9800;
|
||||
- loadConf->globals.mainQ.iMainMsgQDiscardSeverity = 8;
|
||||
- loadConf->globals.mainQ.iMainMsgQueMaxFileSize = 1024 * 1024;
|
||||
- loadConf->globals.mainQ.iMainMsgQueueNumWorkers = 1;
|
||||
- loadConf->globals.mainQ.iMainMsgQPersistUpdCnt = 0;
|
||||
- loadConf->globals.mainQ.bMainMsgQSyncQeueFiles = 0;
|
||||
- loadConf->globals.mainQ.iMainMsgQtoQShutdown = 1500;
|
||||
- loadConf->globals.mainQ.iMainMsgQtoActShutdown = 1000;
|
||||
- loadConf->globals.mainQ.iMainMsgQtoEnq = 2000;
|
||||
- loadConf->globals.mainQ.iMainMsgQtoWrkShutdown = 60000;
|
||||
- loadConf->globals.mainQ.iMainMsgQWrkMinMsgs = 100;
|
||||
- loadConf->globals.mainQ.iMainMsgQDeqSlowdown = 0;
|
||||
- loadConf->globals.mainQ.bMainMsgQSaveOnShutdown = 1;
|
||||
- loadConf->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
|
||||
- loadConf->globals.mainQ.iMainMsgQueMaxDiskSpace = 0;
|
||||
- loadConf->globals.mainQ.iMainMsgQueDeqBatchSize = 32;
|
||||
+
|
||||
+ cnfSetDefaults(loadConf);
|
||||
|
||||
return RS_RET_OK;
|
||||
}
|
||||
--
|
||||
1.9.3
|
||||
|
@ -28,6 +28,8 @@ Patch1: rsyslog-8.8.0-immutable-json-props.patch
|
||||
Patch2: rsyslog-8.8.0-missing-test-data.patch
|
||||
# https://github.com/rsyslog/rsyslog/pull/412
|
||||
Patch3: rsyslog-8.10.0-imjournal-empty-messages.patch
|
||||
# https://github.com/rsyslog/rsyslog/pull/413
|
||||
Patch4: rsyslog-8.10.0-resetconfigvariables.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: dos2unix
|
||||
@ -254,6 +256,7 @@ mv build doc
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%ifarch sparc64
|
||||
@ -513,6 +516,8 @@ done
|
||||
related: rhbz#1224972
|
||||
- add a patch to prevent a crash on empty messages
|
||||
resolves: rhbz#1224538
|
||||
- add a patch to fix several default parameters for message queues
|
||||
resolves: rhbz#1205696
|
||||
|
||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.8.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user