backend/rhn-conf/rhn.conf | 2 ++
backend/server/rhn.conf.sample | 1 +
monitoring/status_log_acceptor/AcceptStatusLog.pm | 9 +++++++++
monitoring/status_log_acceptor/status_log_acceptor.spec | 6 +++++-
rel-eng/packages/status_log_acceptor | 2 +-
5 files changed, 18 insertions(+), 2 deletions(-)
New commits:
commit e28794caf7e466bf193cc269d5cae96b3fcf0dc2
Author: Stephen Herr <sherr(a)redhat.com>
Date: Tue Apr 24 18:06:12 2012 -0400
Automatic commit of package [status_log_acceptor] release [0.12.11-1].
diff --git a/monitoring/status_log_acceptor/status_log_acceptor.spec
b/monitoring/status_log_acceptor/status_log_acceptor.spec
index 797504b..575799f 100644
--- a/monitoring/status_log_acceptor/status_log_acceptor.spec
+++ b/monitoring/status_log_acceptor/status_log_acceptor.spec
@@ -1,6 +1,6 @@
Name: status_log_acceptor
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.12.10
+Version: 0.12.11
Release: 1%{?dist}
Summary: Current state log acceptor
URL:
https://fedorahosted.org/spacewalk
@@ -38,6 +38,10 @@ install -m 444 AcceptStatusLog.pm
$RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse
rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Apr 24 2012 Stephen Herr <sherr(a)redhat.com> 0.12.11-1
+- 815964 - update monitoring probes in small batches to reduce the chance of a
+ deadlock
+
* Wed Feb 01 2012 Jan Pazdziora 0.12.10-1
- Make the Last update value not truncated to day which makes the probe state
actually green.
diff --git a/rel-eng/packages/status_log_acceptor b/rel-eng/packages/status_log_acceptor
index ad06aea..ef92859 100644
--- a/rel-eng/packages/status_log_acceptor
+++ b/rel-eng/packages/status_log_acceptor
@@ -1 +1 @@
-0.12.10-1 monitoring/status_log_acceptor/
+0.12.11-1 monitoring/status_log_acceptor/
commit 6f79cf500064b4bf0d5055fef4756351da912ad3
Author: Stephen Herr <sherr(a)redhat.com>
Date: Tue Apr 24 18:05:51 2012 -0400
815964 - update monitoring probes in small batches to reduce the chance of a deadlock
diff --git a/backend/rhn-conf/rhn.conf b/backend/rhn-conf/rhn.conf
index a257157..969486c 100644
--- a/backend/rhn-conf/rhn.conf
+++ b/backend/rhn-conf/rhn.conf
@@ -13,3 +13,5 @@ log_file = /var/log/rhn/rhn.log
enable_snapshots = 1
+web.monitoring_probes_batch_size = 50
+
diff --git a/backend/server/rhn.conf.sample b/backend/server/rhn.conf.sample
index 133f208..4fd075e 100644
--- a/backend/server/rhn.conf.sample
+++ b/backend/server/rhn.conf.sample
@@ -81,6 +81,7 @@ web.mail_server_errors = user0(a)redhat.com, user1(a)redhat.com
web.rhnproc_server = #FIXME
web.rhnproc_port = #FIXME
+#web.monitoring_probes_batch_size = 50
diff --git a/monitoring/status_log_acceptor/AcceptStatusLog.pm
b/monitoring/status_log_acceptor/AcceptStatusLog.pm
index 2e6a0a8..9a3f347 100644
--- a/monitoring/status_log_acceptor/AcceptStatusLog.pm
+++ b/monitoring/status_log_acceptor/AcceptStatusLog.pm
@@ -4,6 +4,7 @@ package NOCpulse::AcceptStatusLog;
use strict;
use RHN::DBI;
+use PXT::Config;
use CGI;
use NOCpulse::Config;
use LWP::UserAgent;
@@ -39,6 +40,8 @@ sub store_probe_state
my @lines = split("\n", $probe_state);
my $line;
+ my $count = 0;
+ my $probes_per_commit = PXT::Config->get('monitoring_probes_batch_size');
foreach $line (@lines)
{
@@ -73,6 +76,12 @@ sub store_probe_state
$cs_dbh->errstr, $sat_cluster_id, $probe_id));
}
+ $count ++;
+ if ( $count >= $probes_per_commit ) {
+ $count = 0;
+ $cs_dbh->commit();
+ }
+
}
$cs_dbh->commit();