Module: check_mk
Branch: master
Commit: 3f5c436f63d82a25b7593e419bde24c20ff8c8b6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f5c436f63d82a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Mar 6 09:15:54 2019 +0100
Fixed class and type columns of log table.
CMK-1785
Change-Id: Ia98aa470413a1383a0dde62865e3dba16c8a0403
---
livestatus/src/TableLog.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/livestatus/src/TableLog.cc b/livestatus/src/TableLog.cc
index 2ce18d1..5b71eee 100644
--- a/livestatus/src/TableLog.cc
+++ b/livestatus/src/TableLog.cc
@@ -74,14 +74,14 @@ TableLog::TableLog(MonitoringCore *mc, LogCache *log_cache)
addColumn(std::make_unique<OffsetIntColumn>(
"class",
"The class of the message as integer (0:info, 1:state, 2:program, 3:notification, 4:passive, 5:command)",
- entry_offset - 1, -1, -1, DANGEROUS_OFFSETOF(LogEntry, _class)));
+ entry_offset, -1, -1, DANGEROUS_OFFSETOF(LogEntry, _class)));
addColumn(std::make_unique<OffsetSStringColumn>(
"message", "The complete message line including the timestamp",
entry_offset, -1, -1, DANGEROUS_OFFSETOF(LogEntry, _message)));
addColumn(std::make_unique<OffsetStringColumn>(
"type",
"The type of the message (text before the colon), the message itself for info messages",
- entry_offset - 1, -1, -1, DANGEROUS_OFFSETOF(LogEntry, _type)));
+ entry_offset, -1, -1, DANGEROUS_OFFSETOF(LogEntry, _type)));
addColumn(std::make_unique<OffsetStringColumn>(
"options", "The part of the message after the ':'", entry_offset, -1,
-1, DANGEROUS_OFFSETOF(LogEntry, _options)));
Module: check_mk
Branch: master
Commit: 028dcf0e3f58ce0eb540a5f2b5c54f4ce0da170b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=028dcf0e3f58ce…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 5 13:21:35 2019 +0100
7228 FIX Fixed failing liveproxyd activation when process is currently starting
There was a race condition in the code that made configuration changes fail
with a message like "Could not reload Livestatus Proxy: invalid literal for
int() with base 10: \'\'. See web.log for further information." when one
tried to chang the site configuration while the proxy was currently in a
specific part of the process startup phase.
Change-Id: I88de20d46895643bf8b811493ccfc4f9af97eabd
---
.werks/7228 | 14 ++++++++++++++
cmk/gui/watolib/config_domains.py | 8 +++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/7228 b/.werks/7228
new file mode 100644
index 0000000..803770d
--- /dev/null
+++ b/.werks/7228
@@ -0,0 +1,14 @@
+Title: Fixed failing liveproxyd activation when process is currently starting
+Level: 1
+Component: liveproxy
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1551788397
+Class: fix
+
+There was a race condition in the code that made configuration changes fail
+with a message like "Could not reload Livestatus Proxy: invalid literal for
+int() with base 10: \'\'. See web.log for further information." when one
+tried to chang the site configuration while the proxy was currently in a
+specific part of the process startup phase.
diff --git a/cmk/gui/watolib/config_domains.py b/cmk/gui/watolib/config_domains.py
index 8f2db16..fb4195e 100644
--- a/cmk/gui/watolib/config_domains.py
+++ b/cmk/gui/watolib/config_domains.py
@@ -39,7 +39,6 @@ import cmk.gui.config as config
import cmk.gui.mkeventd as mkeventd
from cmk.gui.log import logger
from cmk.gui.i18n import _
-from cmk.gui.globals import html
from cmk.gui.exceptions import MKGeneralException
from cmk.gui.watolib.changes import log_audit
@@ -127,6 +126,13 @@ class ConfigDomainLiveproxy(ConfigDomain):
pass
else:
raise
+ except ValueError:
+ # ignore empty pid file (may happen during locking in
+ # cmk.utils.daemon.lock_with_pid_file(). We are in the
+ # situation where the livstatus proxy is in early phase of the
+ # startup. The configuration is loaded later -> no reload needed
+ pass
+
except Exception as e:
logger.exception()
raise MKGeneralException(
Module: check_mk
Branch: master
Commit: b3af9ec7ba234b1bf39ed088ee7af23f3cc0cd30
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3af9ec7ba234b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 5 12:51:26 2019 +0100
7227 FIX Fixed liveproxy activating errors confusing site related web API calls
Unclean error handling could make site management related web API calls like set_all_sites
fail because an ASCII error message was sent back as result to the API call instead of
the expected JSON data structure.
Change-Id: I3a14c36b0e495578eb8be701c05e242b586fd377
---
.werks/7227 | 12 ++++++++++++
cmk/gui/watolib/config_domains.py | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/7227 b/.werks/7227
new file mode 100644
index 0000000..d43cfb9
--- /dev/null
+++ b/.werks/7227
@@ -0,0 +1,12 @@
+Title: Fixed liveproxy activating errors confusing site related web API calls
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1551786567
+Class: fix
+
+Unclean error handling could make site management related web API calls like set_all_sites
+fail because an ASCII error message was sent back as result to the API call instead of
+the expected JSON data structure.
diff --git a/cmk/gui/watolib/config_domains.py b/cmk/gui/watolib/config_domains.py
index 30b9334..8f2db16 100644
--- a/cmk/gui/watolib/config_domains.py
+++ b/cmk/gui/watolib/config_domains.py
@@ -129,8 +129,8 @@ class ConfigDomainLiveproxy(ConfigDomain):
raise
except Exception as e:
logger.exception()
- html.show_warning(
- _("Could not reload Livestatus Proxy: %s. See web.log "
+ raise MKGeneralException(
+ _("Could not reload Livestatus Proxy: %s. See web.log and liveproxyd.log "
"for further information.") % e)
# TODO: Move default values to common module to share