Module: check_mk
Branch: master
Commit: a38ad6db2637a8d51ec39b51fd1b072a1ab5161e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a38ad6db2637a8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 16 13:58:10 2015 +0200
When executing actions, for example setting downtimes, on equal named hosts
existing in different sites, previous versions did only execute the action
for the first site. The actions for the equal named hosts/services were
not performed on the other sites.
Conflicts:
ChangeLog
web/htdocs/views.py
---
.werks/2468 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2468 b/.werks/2468
new file mode 100644
index 0000000..432ea2e
--- /dev/null
+++ b/.werks/2468
@@ -0,0 +1,13 @@
+Title: Fixed actions for duplicate host names on different sites
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437047135
+
+When executing actions, for example setting downtimes, on equal named hosts
+existing in different sites, previous versions did only execute the action
+for the first site. The actions for the equal named hosts/services were
+not performed on the other sites.
diff --git a/ChangeLog b/ChangeLog
index e05ae58..1edd074 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -75,6 +75,7 @@
* 1263 FIX: Fixed handling of urls in views...
* 2396 FIX: LDAP: Fixed handling of LDAP trees having special chars in the path (e.g.
in OU names)...
* 2459 FIX: Preventing caching of all HTTP requests to dynamic pages (*.py)...
+ * 2468 FIX: Fixed actions for duplicate host names on different sites...
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index a7e0dfe..88df516 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1960,7 +1960,7 @@ def do_actions(view, what, action_rows, backurl):
for nr, row in enumerate(action_rows):
core_commands, title, executor = core_command(what, row, nr, len(action_rows))
for command_entry in core_commands:
- if command_entry not in already_executed:
+ if (row["site"], command_entry) not in already_executed:
# Some command functions return the information about the site
per-command (e.g. for BI)
if type(command_entry) == tuple:
site, command = command_entry
@@ -1972,7 +1972,7 @@ def do_actions(view, what, action_rows, backurl):
command = command.encode("utf-8")
executor(command, site)
- already_executed.add(command_entry)
+ already_executed.add((row["site"], command_entry))
count += 1
message = None