Module: check_mk
Branch: master
Commit: 45eb8f68a416135fbabf0ed249f0287b78bd401b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=45eb8f68a41613…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jun 22 08:25:00 2017 +0200
4893 FIX Fixed creation of default "local" site
Previous 1.4 versions were creating a new distributed monitoring site
when there did not exist a site named exactly like the site ID of the
central site.
WATO now only creates this default site entry when there is no site
configured at all.
Change-Id: If6bd65869fdeb2e27d8edf340e4f43fc92c6fe91
---
.werks/4893 | 16 ++++++++++++++++
web/htdocs/config.py | 6 +++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/4893 b/.werks/4893
new file mode 100644
index 0000000..3ff21a5
--- /dev/null
+++ b/.werks/4893
@@ -0,0 +1,16 @@
+Title: Fixed creation of default "local" site
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1498112602
+
+Previous 1.4 versions were creating a new distributed monitoring site
+when there did not exist a site named exactly like the site ID of the
+central site.
+
+WATO now only creates this default site entry when there is no site
+configured at all.
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 82f7f0d..03e15eb 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -129,6 +129,10 @@ def load_config():
# Set default values for all user-changable configuration settings
load_plugins(True)
+ # Initialze sites with default site configuration. Need to do it here to
+ # override possibly deleted sites
+ sites = default_single_site_configuration()
+
# First load main file
include("multisite.mk")
@@ -634,7 +638,7 @@ def default_single_site_configuration():
'user_login' : True,
}}
-sites = default_single_site_configuration()
+sites = {}
def sitenames():
return sites.keys()