You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vinod Kone <vi...@mesosphere.io> on 2016/09/16 21:17:28 UTC

Re: Choice between LOG(FATAL) and EXIT(EXIT_FAILURE)

We typically used LOG(FATAL) when we were interested in the stack trace. If
not, we preferred to use EXIT(EXIT_FAILURE). While that was the original
intention, not sure if we have been following that distinction diligently.

Separately, we should fix EXIT to log at ERROR level instead of just
printing to to stderr.

On Tue, Aug 30, 2016 at 10:42 AM, Zhitao Li <zh...@gmail.com> wrote:

> Hi,
>
> Can someone explain better about when we should use LOG(FATAL) and when
> EXIT(EXIT_FAILURE) in Mesos codebase?
>
> One thing is that EXIT(EXIT_FAILURE) does not seem to leave anything in the
> level separated GLOG files so it could be mysterious to people who relies
> on that for debugging issues.
>
> I see we have about 100 call sites to LOG(FATAL) and 200 call sites
> to EXIT(EXIT_FAILURE) at the moment.
>
> Many thanks!
>
> --
> Cheers,
>
> Zhitao Li
>

Re: Choice between LOG(FATAL) and EXIT(EXIT_FAILURE)

Posted by Zhitao Li <zh...@gmail.com>.
Thanks! This is exactly a duplicate of that patch.

On Mon, May 8, 2017 at 3:02 PM, James Peach <jo...@gmail.com> wrote:

>
> > On May 8, 2017, at 2:02 PM, Zhitao Li <zh...@gmail.com> wrote:
> >
> > Hi Vinod,
> >
> > I'm reviving this old conversation from last year.
> >
> > We are feeling some operational pain again, mostly due to journald
> > truncates the stderr of Mesos agent so we cannot see a full exit message
> > even in journald, and the error is not in GLOG output at all.
> >
> > I filed https://issues.apache.org/jira/browse/MESOS-7472 to track this.
> We
> > can submit the patch as long as some committer can shepherd this.
>
>
> https://reviews.apache.org/r/56681/
>
>
> >
> > Thanks!
> >
> > On Fri, Sep 16, 2016 at 2:17 PM, Vinod Kone <vi...@mesosphere.io> wrote:
> >
> >> We typically used LOG(FATAL) when we were interested in the stack
> trace. If
> >> not, we preferred to use EXIT(EXIT_FAILURE). While that was the original
> >> intention, not sure if we have been following that distinction
> diligently.
> >>
> >> Separately, we should fix EXIT to log at ERROR level instead of just
> >> printing to to stderr.
> >>
> >> On Tue, Aug 30, 2016 at 10:42 AM, Zhitao Li <zh...@gmail.com>
> wrote:
> >>
> >>> Hi,
> >>>
> >>> Can someone explain better about when we should use LOG(FATAL) and when
> >>> EXIT(EXIT_FAILURE) in Mesos codebase?
> >>>
> >>> One thing is that EXIT(EXIT_FAILURE) does not seem to leave anything in
> >> the
> >>> level separated GLOG files so it could be mysterious to people who
> relies
> >>> on that for debugging issues.
> >>>
> >>> I see we have about 100 call sites to LOG(FATAL) and 200 call sites
> >>> to EXIT(EXIT_FAILURE) at the moment.
> >>>
> >>> Many thanks!
> >>>
> >>> --
> >>> Cheers,
> >>>
> >>> Zhitao Li
> >>>
> >>
> >
> >
> >
> > --
> > Cheers,
> >
> > Zhitao Li
>
>


-- 
Cheers,

Zhitao Li

Re: Choice between LOG(FATAL) and EXIT(EXIT_FAILURE)

Posted by James Peach <jo...@gmail.com>.
> On May 8, 2017, at 2:02 PM, Zhitao Li <zh...@gmail.com> wrote:
> 
> Hi Vinod,
> 
> I'm reviving this old conversation from last year.
> 
> We are feeling some operational pain again, mostly due to journald
> truncates the stderr of Mesos agent so we cannot see a full exit message
> even in journald, and the error is not in GLOG output at all.
> 
> I filed https://issues.apache.org/jira/browse/MESOS-7472 to track this. We
> can submit the patch as long as some committer can shepherd this.


https://reviews.apache.org/r/56681/


> 
> Thanks!
> 
> On Fri, Sep 16, 2016 at 2:17 PM, Vinod Kone <vi...@mesosphere.io> wrote:
> 
>> We typically used LOG(FATAL) when we were interested in the stack trace. If
>> not, we preferred to use EXIT(EXIT_FAILURE). While that was the original
>> intention, not sure if we have been following that distinction diligently.
>> 
>> Separately, we should fix EXIT to log at ERROR level instead of just
>> printing to to stderr.
>> 
>> On Tue, Aug 30, 2016 at 10:42 AM, Zhitao Li <zh...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> Can someone explain better about when we should use LOG(FATAL) and when
>>> EXIT(EXIT_FAILURE) in Mesos codebase?
>>> 
>>> One thing is that EXIT(EXIT_FAILURE) does not seem to leave anything in
>> the
>>> level separated GLOG files so it could be mysterious to people who relies
>>> on that for debugging issues.
>>> 
>>> I see we have about 100 call sites to LOG(FATAL) and 200 call sites
>>> to EXIT(EXIT_FAILURE) at the moment.
>>> 
>>> Many thanks!
>>> 
>>> --
>>> Cheers,
>>> 
>>> Zhitao Li
>>> 
>> 
> 
> 
> 
> -- 
> Cheers,
> 
> Zhitao Li


Re: Choice between LOG(FATAL) and EXIT(EXIT_FAILURE)

Posted by Zhitao Li <zh...@gmail.com>.
Hi Vinod,

I'm reviving this old conversation from last year.

We are feeling some operational pain again, mostly due to journald
truncates the stderr of Mesos agent so we cannot see a full exit message
even in journald, and the error is not in GLOG output at all.

I filed https://issues.apache.org/jira/browse/MESOS-7472 to track this. We
can submit the patch as long as some committer can shepherd this.

Thanks!

On Fri, Sep 16, 2016 at 2:17 PM, Vinod Kone <vi...@mesosphere.io> wrote:

> We typically used LOG(FATAL) when we were interested in the stack trace. If
> not, we preferred to use EXIT(EXIT_FAILURE). While that was the original
> intention, not sure if we have been following that distinction diligently.
>
> Separately, we should fix EXIT to log at ERROR level instead of just
> printing to to stderr.
>
> On Tue, Aug 30, 2016 at 10:42 AM, Zhitao Li <zh...@gmail.com> wrote:
>
> > Hi,
> >
> > Can someone explain better about when we should use LOG(FATAL) and when
> > EXIT(EXIT_FAILURE) in Mesos codebase?
> >
> > One thing is that EXIT(EXIT_FAILURE) does not seem to leave anything in
> the
> > level separated GLOG files so it could be mysterious to people who relies
> > on that for debugging issues.
> >
> > I see we have about 100 call sites to LOG(FATAL) and 200 call sites
> > to EXIT(EXIT_FAILURE) at the moment.
> >
> > Many thanks!
> >
> > --
> > Cheers,
> >
> > Zhitao Li
> >
>



-- 
Cheers,

Zhitao Li