Package: hobbit-plugins
Severity: wishlist

The libs test is doing a fine job on almost every system. One where it fails is on an imap server where imapd holds open some deleted files indicating which messages have been seen by the user. This results in a 'false' yellow - 'false', at least, as far as the sysadmins are concerned although the script is behaving perfectly well.

I suggest a config file in /etc/hobbit which permits the administrator to over-ride tests for a particular process: a patch and sample config are attached.

Yours,

Frank
--- libs        2011-10-22 19:04:53.000000000 +0100
+++ libs2       2012-09-01 19:39:21.000000000 +0100
@@ -33,6 +33,12 @@
 my $LSOF = '/usr/bin/lsof';
 my $SUDO = '/usr/bin/sudo';
 
+################### To permit exceptions
+my %adjustments;
+if (-e '/etc/hobbit/libs.pl.cfg') {
+ eval `cat /etc/hobbit/libs.pl.cfg` || die ("Cannot parse config file");
+}
+
 my $bb = new Hobbit ('libs');
 
 ################### Kernel
@@ -150,6 +156,7 @@
                next if $path =~ m#^/dev/zero#;
                next if ($INVSERVER && ($process eq 'init') && ($pid == 1) && 
($user eq 'root'));
                #$processes{$user}->{$process} = [] unless defined 
$processes{$user}->{$process};
+               next if ($adjustments{$process} && ($path =~ 
$adjustments{$process}));
                $processes{$user}->{$process}->{$pid} = 1;
        };
 };
# To permit deleted files in particular parts of the filesystem for given 
processes

%adjustments=('imapd'=>qr/\/var\/lib\/cyrus\/user\/.*/);

Reply via email to