Module: check_mk
Branch: master
Commit: 5dce5d71ac9fbb338f5479bb37192de1e2df0579
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5dce5d71ac9fbb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 13 14:48:25 2012 +0200
FIX: Removing distributed wato file when local site could not be determined
---
web/htdocs/wato.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index e078419..ea70a48 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6773,12 +6773,18 @@ def update_distributed_wato_file(sites):
# are currently in the process of saving the new
# site configuration.
distributed = False
+ found_local = False
for siteid, site in sites.items():
if site.get("replication"):
distributed = True
if site_is_local(siteid):
+ found_local = True
create_distributed_wato_file(siteid, site.get("replication"))
- if not distributed:
+
+ # Remove the distributed wato file
+ # a) If there is no distributed WATO setup
+ # b) If the local site could not be gathered
+ if not distributed or not found_local:
delete_distributed_wato_file()
#.