On Fri, 16 Aug 2002, Andrew Ryan wrote:
> If it is a bug, it's probably a big with mon, and not mon.cgi per se, since
> mon.cgi is just a mon client which executes a "reset" command on the server.
>
> It's worth trying to reproduce this same problem with the command line mon
> client, see if you get the same behavior. And to run the mon server in
> debug mode, to see the command which mon thinks is coming in.

Reproduced, tracked down and fixed. You're right, Andrew, it was a bug in
mon, present at least in 0.99.1 (which we still run on) and 0.99.2.

read_cf carried over disabled status of hosts, no matter what. After that,
reset_server called load_state only if keepstate was defined.

AFAICT, load_state should be enough to keep all state.

As a bonus, the only thing my patch does is remove code :)

Jim, please include in next release... patch attached.

-- 
Erik I. Bolsų, Triangel Software AS | Skybert AS
Tlf: 712 41 694         Mobil: 915 79 512
diff -Naur mon-0.99.2-patch/mon mon-0.99.2/mon
--- mon-0.99.2-patch/mon        Sat Sep  8 15:42:05 2001
+++ mon-0.99.2/mon      Mon Nov 18 18:59:54 2002
@@ -1028,27 +1028,8 @@
 
 
            $hosts = $2;
-           %disabled = ();
-
-           foreach $h (grep (/^\*/, @{$groups{$curgroup}}))
-           {
-               # We have to make $i = $h because $h is actually
-               # a pointer to %groups and will modify it.
-               $i = $h;
-               $i =~ s/^\*//;
-               $disabled{$i} = 1;
-           }
 
            @{$new_groups{$curgroup}} = split(/\s+/, $hosts);
-
-           #
-           # keep hosts which were previously disabled
-           #
-           for ($i=0;$i<@{$new_groups{$curgroup}};$i++)
-           {
-               $new_groups{$curgroup}[$i] = "*$new_groups{$curgroup}[$i]"
-                   if ($disabled{$new_groups{$curgroup}[$i]});
-           }
 
            next;
        }

Reply via email to