On 2019-02-17 14:13:45 +0300, Sergey B Kirpichev wrote:
> On Sat, 22 Dec 2018 03:17:27 +0100 Vincent Lefevre <vinc...@vinc17.net> wrote:
> > So, it seems to be a bug in the monit code that makes it think that
> > the link is up while it is not.
> > 
> > In validate.c, I see:
> > 
> > [...]
> >         for (LinkStatus_T link = s->linkstatuslist; link; link = 
> > link->next) {
> >                 Event_post(s, Event_Link, State_Succeeded, link->action, 
> > "link data collection succeeded");
> >         }
> >         // State
> >         if (! Link_getState(s->inf.net->stats)) {
> >                 for (LinkStatus_T link = s->linkstatuslist; link; link = 
> > link->next)
> >                         Event_post(s, Event_Link, State_Failed, 
> > link->action, "link down");
> >                 return State_Failed; // Terminate test if the link is down
> >         } else {
> >                 for (LinkStatus_T link = s->linkstatuslist; link; link = 
> > link->next)
> >                         Event_post(s, Event_Link, State_Succeeded, 
> > link->action, "link up");
> 
> Ok, CC upstream to see their opinion (I think this problem wasn't reported 
> yet.)

According to my mail archives, 1:5.25.1-1 was fine, and 1:5.25.2-1
has the bug.

So I suspect that it is the following commit that introduced the bug:

diff --git a/src/validate.c b/src/validate.c
index a2fd520..f5e630b 100644
--- a/src/validate.c
+++ b/src/validate.c
@@ -1751,7 +1751,7 @@ State_Type check_net(Service_T s) {
         if (! havedata)
                 return State_Failed; // Terminate test if no data are available
         for (LinkStatus_T link = s->linkstatuslist; link; link = link->next) {
-                Event_post(s, Event_Size, State_Succeeded, link->action, "link 
data collection succeeded");
+                Event_post(s, Event_Link, State_Succeeded, link->action, "link 
data collection succeeded");
         }
         // State
         if (! Link_getState(s->inf.net->stats)) {

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to