freeipmi-users
[Top][All Lists]
Advanced

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

Re: [Freeipmi-users] How to detect broken LAN session


From: Albert Chu
Subject: Re: [Freeipmi-users] How to detect broken LAN session
Date: Tue, 9 Apr 2019 06:31:22 -0700

Thanks for trying it out.  It'll be in the next release of FreeIPMI.

Al

On Tue, Apr 9, 2019 at 5:40 AM Klemen Vodopivec <address@hidden> wrote:
>
> Simply commenting out API_BAD_RESPONSE_TO_API_ERRNUM gives me the correct
> errnum=14. Thanks Al.
>
> On Mon, Apr 8, 2019 at 6:55 PM Al Chu <address@hidden> wrote:
>
> > Hi Klemen,
> >
> > I'm assuming you're using the primary API from "libfreeipmi/api".  Just
> > want to make sure.
> >
> > > If I'm not mistaken, the session won't automatically reconnect, at
> > > least it doesn't for me.
> >
> > You are correct.
> >
> > > So I'm trying to detect dropped connection and
> > > reconnect
> > > but I'm having trouble getting meaningful error code that would
> > > uniquely
> > > tell me when to reconnect. In my case ipmi_cmd() function returns
> > > errno 24
> > > (bad completion code) but it's really just masking the error as there
> > > is no
> > > comp_code in the response message in the first place. Debugging
> > > through
> > > the  stack I see ipmi_cmd_send_message() properly identifies error as
> > > IPMI_ERR_SESSION_TIMEOUT in ipmi-lan-session-
> > > common.c:_ipmi_cmd_send_ipmb()
> > > but then invokes API_BAD_RESPONSE_TO_API_ERRNUM which results in
> > > errnum=24.
> >
> > IPMI_ERR_SESSION_TIMEOUT should be the error you get if a timeout
> > occurs.  If that's not the case, that's a bug.
> >
> > Skimming through the code, I think it might be an outright mistake to
> > call API_BAD_RESPONSE_TO_API_ERRNUM and that line should be deleted.
> >
> > Would you like to give it a shot?
> >
> > Al
> >
> >  On Mon, 2019-04-08 at 17:45 -0400, Klemen Vodopivec wrote:
> > > Hi,
> > >
> > > I'm working on an IPMI bridge to EPICS control system where the
> > > daemon-like
> > > process is intended to have  IPMI session established always
> > > established.
> > > So I'm looking for best practices how to keep the connection open.
> > >
> > > If I'm not mistaken, the session won't automatically reconnect, at
> > > least it
> > > doesn't for me. So I'm trying to detect dropped connection and
> > > reconnect
> > > but I'm having trouble getting meaningful error code that would
> > > uniquely
> > > tell me when to reconnect. In my case ipmi_cmd() function returns
> > > errno 24
> > > (bad completion code) but it's really just masking the error as there
> > > is no
> > > comp_code in the response message in the first place. Debugging
> > > through
> > > the  stack I see ipmi_cmd_send_message() properly identifies error as
> > > IPMI_ERR_SESSION_TIMEOUT in ipmi-lan-session-
> > > common.c:_ipmi_cmd_send_ipmb()
> > > but then invokes API_BAD_RESPONSE_TO_API_ERRNUM which results in
> > > errnum=24.
> > >
> > > Writing all these function calls may already be too much details and
> > > hopefully I'm just missing some high-level function I can call.
> > >
> > > Thanks, Klemen
> > > _______________________________________________
> > > Freeipmi-users mailing list
> > > address@hidden
> > > https://lists.gnu.org/mailman/listinfo/freeipmi-users
> >
> >
> _______________________________________________
> Freeipmi-users mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/freeipmi-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]