Module: check_mk
Branch: master
Commit: 18d955d419ad3badd80dfee812d77bb9e2d55566
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18d955d419ad3b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 20:27:46 2012 +0200
Used tmp-file for POST data if too large for command line
---
ChangeLog | 2 +-
web/htdocs/wato.py | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 964da72..3b270a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,7 @@
* FIX: better error message if not logged into site during
action that needs remote access
* FIX: send automation data via POST not GET. This fixes inventory
- on hosts with up to 2000 services
+ on hosts with more than 500 services.
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2f9511f..a6d167e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6657,9 +6657,22 @@ def get_url(url, insecure, user=None, password=None, params = '', post_data = No
# -s: silent
# -S: show errors
# -w '%{http_code}': add the http status code to the end of the output
- command = 'curl -w "\n%%{http_code}" -s -S%s%s%s "%s" 2>&1' % (insecure, cred, params, url)
+ command = 'curl -w "\n%%{http_code}" -s -S%s%s%s "%s" 2>&1' % (
+ insecure, cred, params, url)
+ tmp_file = None
if post_data != None:
- command += ' --data-binary "%s"' % post_data
+ # Put POST data on command line as long as it is not
+ # longer than 50 KB (remember: Linux has an upper limit
+ # of 132 KB for command line plus environment
+ if len(post_data) < 50000:
+ command += ' --data-binary "%s"' % post_data
+ else:
+ import tempfile
+ tmp_file = tempfile.NamedTemporaryFile(dir = defaults.tmp_dir)
+ tmp_file.write(post_data)
+ tmp_file.flush()
+ command += ' --data-binary "@%s"' % tmp_file.name
+
response = os.popen(command).read().strip()
try:
status_code = int(response[-3:])
Module: check_mk
Branch: master
Commit: 326f1c94da055c40898cd5e9ae4651bc8c1a38bb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=326f1c94da055c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 20:27:27 2012 +0200
Updated bug entries #0672
---
.bugs/672 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/672 b/.bugs/672
index c41ef77..e53c665 100644
--- a/.bugs/672
+++ b/.bugs/672
@@ -1,9 +1,9 @@
Title: Hosts with 4.000 services in replicated WATO fail
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-04-06 11:23:12
Targetversion: 1.2.0
-Class: bug
When a host has many services and you save a manual check
configuration for a host on a slave site, then the command
@@ -12,3 +12,6 @@ a useful error message.
Solution: put the post data into a tmp file (yurks) - optimally
only if it is too large.
+
+2012-05-06 20:27:23: changed state open -> done
+Works now (tested) with 10.000 services on one host.
Module: check_mk
Branch: master
Commit: f67c8f0b14c072634d4f9f79bdaa870df626b4e4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f67c8f0b14c072…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 19:53:35 2012 +0200
Updated bug entries #0672
---
.bugs/672 | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.bugs/672 b/.bugs/672
index 723cd0a..c41ef77 100644
--- a/.bugs/672
+++ b/.bugs/672
@@ -1,4 +1,4 @@
-Title: Hosts with many services in replicated WATO -> Request-URI Too Large
+Title: Hosts with 4.000 services in replicated WATO fail
Component: wato
State: open
Date: 2012-04-06 11:23:12
@@ -6,7 +6,9 @@ Targetversion: 1.2.0
Class: bug
When a host has many services and you save a manual check
-configuration for a host on a slave site, then the internal
-web services the remotely does inventory creates a too large
-URL. Either convert this to POST or send the list of
-services as a Python object as the body of the request.
+configuration for a host on a slave site, then the command
+line for curl is getting too large. This does not even output
+a useful error message.
+
+Solution: put the post data into a tmp file (yurks) - optimally
+only if it is too large.
Module: check_mk
Branch: master
Commit: bcd22c8272abc911dbc3e2023518c421ea649967
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bcd22c8272abc9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 18:52:26 2012 +0200
FIX: better error message if not logged into site during remote automation
---
ChangeLog | 5 ++++-
web/htdocs/wato.py | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1d329f9..974a60e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
1.2.0b4:
WATO:
* ps and ps.perf configurable via WATO now (without inventory)
- * FIX: honor folder-permissions when creating, deleting and modifiying rules
+ * FIX: honor folder-permissions when creating, deleting
+ and modifiying rules
* FIX: detect non-local site even if unix: is being used
+ * FIX: better error message if not logged into site during
+ action that needs remote access
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 01923e8..5bbec4e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6675,6 +6675,10 @@ def get_url(url, insecure, user=None, password=None, params = ''):
return response_body
def check_mk_remote_automation(siteid, command, args, indata):
+ site = config.site(siteid)
+ if "secret" not in site:
+ raise MKGeneralException(_("Cannot access site %s - you are not logged in.")
+ % site.get("alias", siteid))
# If the site is not up-to-date, synchronize it first.
repstatus = load_replication_status()
if repstatus.get(siteid, {}).get("need_sync"):
Module: check_mk
Branch: master
Commit: a34d5b65175a3de94b6cb8db73d4a4dbbba17a51
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a34d5b65175a3d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 18:28:55 2012 +0200
Use label for checkbox in WATO site configuration
---
web/htdocs/wato.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 49cb264..01923e8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6493,8 +6493,7 @@ def mode_edit_site(phase):
"the connection to the remote sites. This brings a great speed up in high-latency "
"situations but locks a number of threads in the Livestatus module of the target site. "))
html.write("</td><td class=content>")
- html.checkbox("persist", site.get("persist", False))
- html.write(_("Use persistent connections"))
+ html.checkbox("persist", site.get("persist", False), label=_("Use persistent connections"))
html.write("</td></tr>")
# URL-Prefix
Module: check_mk
Branch: master
Commit: f611738373d80b946c1f1408f95414eb5254a74b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f611738373d80b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 12:59:24 2012 +0200
Updated bug entries #0697
---
.bugs/697 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/697 b/.bugs/697
index 141900d..a75d12a 100644
--- a/.bugs/697
+++ b/.bugs/697
@@ -1,9 +1,12 @@
Title: WATO host/folders - <form> must not be nested
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-04-25 12:47:08
Targetversion: 1.2.0
-Class: bug
It is not allowed to have nested forms. The search host form must be moved outside the
host table form.
+
+2012-05-06 12:59:22: changed state open -> done
+Fixed a couple of days ago.