Needed for NagVis Multisite Authorisation)
Message-ID: <510fef4a.OGt9N+jGHMnDXqSE%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: d62f17d5c552a07eeba4c5cdbd66f2db71f01abd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d62f17d5c552a0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 4 09:41:23 2013 +0100
FIX: Fixed generation of auth.php (Needed for NagVis Multisite Authorisation)
---
ChangeLog | 3 ++-
web/htdocs/hooks.py | 18 ++++++++++++++++++
web/htdocs/index.py | 4 ++--
web/htdocs/wato.py | 2 --
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 815639f..680c565 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,12 +36,13 @@
WATO:
* Added hr_mem check to the memory checkgroup to make it configurable in WATO
+ * Make page_header configurable in global settings
* FIX: Fixed some typos in ldap error messages
* FIX: Fixed problem on user profile page when no alias set for a user
* FIX: list valuespecs could not be extended after once saving
* FIX: fix title of foldable areas contained in list valuespecs
* FIX: Fixed bug where pending log was not removed in multisite setup
- * Make page_header configurable in global settings
+ * FIX: Fixed generation of auth.php (Needed for NagVis Multisite Authorisation)
Event Console:
* Added UNIX socket for sending events to the EC
diff --git a/web/htdocs/hooks.py b/web/htdocs/hooks.py
index ea4dc53..c035cfb 100644
--- a/web/htdocs/hooks.py
+++ b/web/htdocs/hooks.py
@@ -28,6 +28,24 @@ import config, sys
hooks = {}
+# Datastructures and functions needed before plugins can be loaded
+loaded_with_language = False
+
+# Load all login plugins
+def load_plugins():
+ global loaded_with_language
+ if loaded_with_language == current_language:
+ return
+
+ # Cleanup all registered hooks. They need to be renewed by load_plugins()
+ # of the other modules
+ unregister()
+
+ # This must be set after plugin loading to make broken plugins raise
+ # exceptions all the time and not only the first time (when the plugins
+ # are loaded).
+ loaded_with_language = current_language
+
def unregister():
global hooks
hooks = {}
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 9a2ab1b..1022055 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -35,7 +35,7 @@ from mod_python import apache, util, Cookie
import sys, os, pprint
from lib import *
import livestatus
-import defaults, config, htmllib, login, userdb, default_permissions
+import defaults, config, htmllib, login, userdb, hooks, default_permissions
# Load page handlers
pagehandlers = {}
@@ -178,7 +178,7 @@ def connect_to_livestatus(html):
# Call the load_plugins() function in all modules
def load_all_plugins():
- for module in [ userdb, views, sidebar, dashboard, wato, bi, mobile ]:
+ for module in [ hooks, userdb, views, sidebar, dashboard, wato, bi, mobile ]:
try:
module.load_plugins # just check if this function exists
module.load_plugins()
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index cce9eca..c77cba2 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11881,8 +11881,6 @@ def load_plugins():
g_rulespec_group = {}
g_rulespec_groups = []
- hooks.unregister()
-
# Declare WATO-specific permissions
config.declare_permission_section("wato", _("WATO - Check_MK's Web Administration Tool"))
Module: check_mk
Branch: master
Commit: 2afeb1f00d3ba804a54147d3eff3ee4fc50e9144
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2afeb1f00d3ba8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 31 17:55:32 2013 +0100
Updated bug entries #0908, #0909
---
.bugs/908 | 7 +++++--
.bugs/909 | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.bugs/908 b/.bugs/908
index 9bc9191..6a6e8b0 100644
--- a/.bugs/908
+++ b/.bugs/908
@@ -1,11 +1,14 @@
Title: mkeventd init script should detect "already running" on start
Component: ec
-State: open
+Class: cleanup
+State: done
Date: 2013-01-31 16:32:50
Targetversion: 1.2.2
-Class: cleanup
When the mkeventd is started using the init-script and already running,
the init script should detect that and print something like:
Starting mkeventd...Already running.
+
+2013-01-31 17:54:12: changed state open -> done
+Just implemented this.
diff --git a/.bugs/909 b/.bugs/909
index 13b895c..279592b 100644
--- a/.bugs/909
+++ b/.bugs/909
@@ -1,9 +1,9 @@
Title: mkeventd init script does not handle stale pidfiles correctly
Component: ec
-State: open
+Class: bug
+State: done
Date: 2013-01-31 16:36:01
Targetversion: 1.2.2
-Class: bug
When running etc/init.d/mkeventd stop when having a pidfile but no running
process, the "kill $THE_PID" call results in an error message which should
@@ -12,3 +12,6 @@ be supressed. Instead it should show "OK" and delete the stale pidfile.
The status command also has this error message which should be suppressed.
Restart is completely broken in this case.
+
+2013-01-31 17:55:30: changed state open -> done
+Has just been implemented
Module: check_mk
Branch: master
Commit: 40377f3bea787f69c61bb8dd17030405ac603b5e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40377f3bea787f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 4 10:09:14 2013 +0100
Updated bug entries #0912, #0910, #0911
---
.bugs/910 | 9 +++++++++
.bugs/911 | 9 +++++++++
.bugs/912 | 9 +++++++++
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/.bugs/910 b/.bugs/910
new file mode 100644
index 0000000..000777f
--- /dev/null
+++ b/.bugs/910
@@ -0,0 +1,9 @@
+Title: Distributed WATO - activate changes bad dialog handling
+Component: wato
+State: open
+Date: 2013-02-04 10:03:33
+Targetversion: 1.2.2
+Class: bug
+
+When having a change pending, clicking "sync & restart", the sync is done, but no
+restart is triggered. The restart has to be done again by clicking "restart".
diff --git a/.bugs/911 b/.bugs/911
new file mode 100644
index 0000000..695e35c
--- /dev/null
+++ b/.bugs/911
@@ -0,0 +1,9 @@
+Title: Distributed WATO - activate changes not transid secured
+Component: wato
+State: open
+Date: 2013-02-04 10:06:34
+Targetversion: 1.2.2
+Class: bug
+
+When one hits F5 during global activate changes, the table is re-rendered and all
+sites do sync & restart again. This should be prevented by transids.
diff --git a/.bugs/912 b/.bugs/912
new file mode 100644
index 0000000..f678597
--- /dev/null
+++ b/.bugs/912
@@ -0,0 +1,9 @@
+Title: Distributed WATO - activate changes -> restart shows no progress bar
+Component: wato
+State: open
+Date: 2013-02-04 10:08:08
+Targetversion: 1.2.2
+Class: bug
+
+When clicking on "restart" for a single site, no background action with a
+progress bar is started. Instead, the browser only shows a loading mouse pointer.
Module: check_mk
Branch: master
Commit: 02007939e5b3021756d0c5da21866b2c920adf88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=02007939e5b302…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 4 14:34:52 2013 +0100
Updated bug entries #0913
---
.bugs/913 | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/.bugs/913 b/.bugs/913
new file mode 100644
index 0000000..0c9d843
--- /dev/null
+++ b/.bugs/913
@@ -0,0 +1,13 @@
+Title: Painter contents should be aligned vertically top when one painter is higher than others
+Component: multisite
+State: open
+Date: 2013-02-04 11:33:52
+Targetversion: 1.2.2
+Class: cleanup
+
+The default vertical alignment is middle. This is ok and should be kept for regular
+layouts where every painter fits in one row (text should be aligned middle to the
+images and perfometers).
+
+But in case there is very long status output which wraps to several lines, the other
+painter contents should be aligned to top.
Module: check_mk
Branch: master
Commit: 58fea1806555328c799e047b0d6010aa3b938334
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=58fea180655532…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 4 11:19:26 2013 +0100
FIX: Fixed missing general.* permissions in auth.php on slave sites in case of distributed WATO setups
---
ChangeLog | 2 ++
web/htdocs/index.py | 10 ++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 680c565..4a2a144 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,8 @@
* FIX: fix title of foldable areas contained in list valuespecs
* FIX: Fixed bug where pending log was not removed in multisite setup
* FIX: Fixed generation of auth.php (Needed for NagVis Multisite Authorisation)
+ * FIX: Fixed missing general.* permissions in auth.php on slave sites in
+ case of distributed WATO setups
Event Console:
* Added UNIX socket for sending events to the EC
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 1022055..518ff6b 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -257,6 +257,12 @@ def handler(req, profiling = True):
# Get page handler
handler = pagehandlers.get(req.myfile, page_not_found)
+ # First initialization of the default permissions. Needs to be done before the auth_file
+ # (auth.php) ist written (it's done during showing the login page for the first time).
+ # Must be loaded before the "automation" call to have the general.* permissions available
+ # during automation action processing (e.g. hooks triggered by restart)
+ default_permissions.load()
+
# Special handling for automation.py. Sorry, this must be hardcoded
# here. Automation calls bybass the normal authentication stuff
if req.myfile == "automation":
@@ -270,10 +276,6 @@ def handler(req, profiling = True):
output_format = html.var("output_format", "html")
html.set_output_format(output_format)
- # First initialization of the default permissions. Needs to be done before the auth_file
- # (auth.php) ist written (it's done during showing the login page for the first time).
- default_permissions.load()
-
# Is the user set by the webserver? otherwise use the cookie based auth
if not req.user or type(req.user) != str:
config.auth_type = 'cookie'