[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#705543: unblock: munin/2.0.6-4



package: release.debian.org
x-debbugs-cc: munin@packages.debian.org

Hi,

please unblock munin 2.0.6-4 it fixes a critical bug (leading to /var/log being filled rather quickly, >0.5gb per week) and an important one (TLS 
being broken, which is a regression compared to squeeze).

The debdiff is attached, rather short and quite straightforward:

$ debdiff munin_2.0.6-3.dsc munin_2.0.6-4.dsc|diffstat
 master/_bin/munin-cgi-graph.in              |    4 +--
 master/_bin/munin-graph.in                  |   34 ++--------------------------
 master/lib/Munin/Master/GraphOld.pm         |   12 ++-------
 master/lib/Munin/Master/Logger.pm           |    4 +--
 munin-2.0.6/debian/changelog                |   10 ++++++++
 munin-2.0.6/master/lib/Munin/Master/Node.pm |    4 +++
 6 files changed, 24 insertions(+), 44 deletions(-)

Sorry for the late upload, but both the problems and fixes were discovered quite late and I wanted to give them some time before uploading.


cheers,
	Holger
diff -u munin-2.0.6/master/lib/Munin/Master/Node.pm munin-2.0.6/master/lib/Munin/Master/Node.pm
--- munin-2.0.6/master/lib/Munin/Master/Node.pm
+++ munin-2.0.6/master/lib/Munin/Master/Node.pm
@@ -623,6 +623,10 @@
 sub _node_read_fast {
 	my ($self) = @_;
 
+	# We cannot bypass the IO if using TLS
+	# so just reverting to normal mode.
+	return _node_read(@_) if $self->{tls};
+
 	# Disable Buffering here, to be able to use sysread()
 	local $| = 1;
 
diff -u munin-2.0.6/debian/changelog munin-2.0.6/debian/changelog
--- munin-2.0.6/debian/changelog
+++ munin-2.0.6/debian/changelog
@@ -1,3 +1,13 @@
+munin (2.0.6-4) unstable; urgency=medium
+
+  * Master/Node.pm: cherry-pick 71d0a86 from 2.0.12 to fix TLS enabled
+    updates. (Closes: #699803)
+  * several master components: turn INFO messages into DEBUG messages to avoid
+    logfiles reaching gigabyte sizes in a few days. The cherries picked were
+    8ad5dda (from 2.0.7) and 4372cdf (from 2.0.12). (Closes: #703479)
+
+ -- Holger Levsen <holger@debian.org>  Tue, 16 Apr 2013 15:48:03 +0200
+
 munin (2.0.6-3) unstable; urgency=low
 
   * debian/rules: set MUNIN_VERSION correctly during build. (Closes: #694527)
only in patch2:
unchanged:
--- munin-2.0.6.orig/master/_bin/munin-cgi-graph.in
+++ munin-2.0.6/master/_bin/munin-cgi-graph.in
@@ -90,7 +90,7 @@
     my $pinpoint = undef;
     my $path = $ENV{PATH_INFO} || "";
 
-    INFO "Request path is $path";
+    DEBUG "Request path is $path";
 
     # The full URL looks like this:
     # Case 1:
@@ -133,7 +133,7 @@
     my ($dom, $host, $serv, $scale) =
       $path =~ m#^/(.*)/([^/]+)/([\w-]+)-([\w=,]+)\.png#; ## avoid bug in vim
 
-    INFO "asked for ($dom, $host, $serv, $scale)";
+    DEBUG "asked for ($dom, $host, $serv, $scale)";
 
     if ($scale =~ /pinpoint=(\d+),(\d+)/) {
 	    $pinpoint = [ $1, $2, ];
only in patch2:
unchanged:
--- munin-2.0.6.orig/master/_bin/munin-graph.in
+++ munin-2.0.6/master/_bin/munin-graph.in
@@ -84,7 +84,7 @@
 my $graph_fh = new IO::File($config->{dbdir} . "/graphs");
 while (my $path = <$graph_fh>) {
     my $pinpoint = undef;
-    INFO "Request path is $path";
+    DEBUG "Request path is $path";
 
     # The full URL looks like this:
     # Case 1:
@@ -126,7 +126,7 @@
     my ($dom, $host, $serv, $scale) =
       $path =~ m#^/(.*)/([^/]+)/(\w+)-([\w=,]+)\.png#; ## avoid bug in vim
 
-    INFO "asked for ($dom, $host, $serv, $scale)";
+    DEBUG "asked for ($dom, $host, $serv, $scale)";
 
     if ($scale =~ /pinpoint=(\d+),(\d+)/) {
 	    $pinpoint = [ $1, $2, ];
@@ -159,15 +159,8 @@
     }
 
     # Now send it: headers
-    INFO "X-Munin-Request: $nb_request/$nb_request_max";
+    DEBUG "X-Munin-Request: $nb_request/$nb_request_max";
 
-    my $headers = get_headers_for_file($filename, $graph_ttl);
-    foreach my $header_name (keys %$headers) {
-        INFO "$header_name: $headers->{$header_name}";
-    }
-
-    # ... and graph data
-    # send_graph_data($filename);
 } continue {
 	$nb_request++;
 	if ($nb_request_max && $nb_request > $nb_request_max) {
@@ -179,27 +172,6 @@
 
 exit 0;
 
-
-sub get_headers_for_file {
-    my ($filename, $graph_ttl) = @_;
-
-    # At this time the file exists and should be served
-    my @stats       = stat ($filename);
-    my $mtime_epoch = $stats[9];
-    my $last_modified = get_w3c_date_from_epoch($mtime_epoch);
-
-    # "Expires" has to use last modified time as base:
-    my $graph_next_expires = $mtime_epoch - ($mtime_epoch % $graph_ttl) + $graph_ttl;
-    my $expires       = get_w3c_date_from_epoch($graph_next_expires);
-
-    return {
-	    "Expires" => $expires,
-	    "Last-Modified" => $last_modified,
-	    "Content-Length" => $stats[7],
-	   };
-}
-
-
 sub get_w3c_date_from_epoch {
     my($epoch) = @_;
     return strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime($epoch));
only in patch2:
unchanged:
--- munin-2.0.6.orig/master/lib/Munin/Master/Logger.pm
+++ munin-2.0.6/master/lib/Munin/Master/Logger.pm
@@ -90,7 +90,7 @@
 	$logopened = 1;
     }
 
-    get_logger('')->info("Opened log file");
+    get_logger('')->debug("Opened log file");
 
     # Get perl warnings into the log files
     $SIG{__WARN__} = \&_warn_catcher;
@@ -117,7 +117,7 @@
 	$logopened = 1;
     }
 
-    get_logger('')->info("Opened log file");
+    get_logger('')->debug("Opened log file");
 
     # Get perl warnings into the log files
     $SIG{__WARN__} = \&_warn_catcher;
only in patch2:
unchanged:
--- munin-2.0.6.orig/master/lib/Munin/Master/GraphOld.pm
+++ munin-2.0.6/master/lib/Munin/Master/GraphOld.pm
@@ -403,16 +403,10 @@
         autoflush $STATS 1;
     }
 
-    INFO "Starting munin-graph";
-
     process_work(@limit_hosts);
 
     $graph_time = sprintf("%.2f", (Time::HiRes::time - $graph_time));
 
-    INFO "Munin-graph finished ($graph_time sec)";
-
-    print $STATS "GT|total|$graph_time\n" unless $skip_stats;
-
     rename(
         "$config->{dbdir}/munin-graph.stats.tmp",
         "$config->{dbdir}/munin-graph.stats"
@@ -1348,7 +1342,7 @@
     for my $time (keys %times) {
         next unless ($draw{$time});
         my $picfilename = get_picture_filename($service, $time);
-	INFO "[INFO] Looking into drawing $picfilename";
+	DEBUG "[DEBUG] Looking into drawing $picfilename";
         (my $picdirname = $picfilename) =~ s/\/[^\/]+$//;
 
         DEBUG "[DEBUG] Picture filename: $picfilename";
@@ -1451,7 +1445,7 @@
     if (munin_get_bool($service, "graph_sums", 0)) {
         foreach my $time (keys %sumtimes) {
             my $picfilename = get_picture_filename($service, $time, 1);
-	    INFO "Looking into drawing $picfilename";
+	    DEBUG "Looking into drawing $picfilename";
             (my $picdirname = $picfilename) =~ s/\/[^\/]+$//;
             next unless ($draw{"sum" . $time});
             my @rrd_sum;
@@ -1556,7 +1550,7 @@
     } # if graph_sums
 
     $service_time = sprintf("%.2f", (Time::HiRes::time - $service_time));
-    INFO "[INFO] Graphed service $skeypath ($service_time sec for $nb_graphs_drawn graphs)";
+    DEBUG "[DEBUG] Graphed service $skeypath ($service_time sec for $nb_graphs_drawn graphs)";
     print $STATS "GS|$service_time\n" unless $skip_stats;
 
     foreach (@added) {

Reply to: