From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH user-cr] Allow for logfile for kernel debug messages (v2)
Date: Wed, 21 Oct 2009 18:18:37 -0400 [thread overview]
Message-ID: <4ADF88BD.20400@librato.com> (raw)
In-Reply-To: <20091021220245.GA8994-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org):
>> Serge E. Hallyn wrote:
>>> If unspecified, -1 will be sent for logfd to the kernel, and there
>>> will be no debug log. If specified, then checkpoint and restart
>>> debug msgs will be sent to the logfile.
>> The new interface will cover error reporting, so when run without '-l'
>
> Not sure what you mean by 'the new interface will cover error reporting'.
I mean that using an logging fd rids the need to write an error record
to the checkpoint image. So I think we may retire ckpt_write_err() in
favor of the new interface.
The downside (if any) is that the error message is cannot be recovered
from the partial image file (so what ?).
And, unlike now, it's a way to report the reason for a restart failure
back to the caller.
I'd like both 'checkpoint' and 'restart' to report the reason for a
failure to the caller (either by default, or with a new switch).
>
>> both 'checkpoint' and 'restart' (unless asked to run extra silently)
>> need to provide a pipe to the syscall, and if an error occurs, display
>> pull the error reason from the pipe and print it.
>
> Sounds like a useful feature, but to be clear note that what is now
> ckpt_err() output from the kernel was debug output before, so compared
> to without this patchset, the user is not losing any information.
True for checkpoint. But the motivation for the new interface (besides
debugging), is to have the same error reporting for restart, too.
>
> In fact what you're saying sounds like even more justification for
> changing some of the
>
> ret = abc();
> ckpt_debug("...", ret);
> if (!ret)
> ret = cdef();
> ckpt_debug("...", ret);
>
> type of flow into one where ckpt_err() is used and only in the case of
> a definite error. Yes?
Hmm... I'm not sure.
I think (...) I'm suggesting two classes of output:
- ckpt_error() to report an error to the user
- ckpt_debug() to report debugging info for developers
The value of a @ret is interesting for error reporting only when
it is negative; but for debugging it may be interesting even if
an error did not occur.
Also, I expect more places where we want to see @ret for debugging.
So @ret may be negative, but ckpt_error() will be called later (e.g.
by our caller).
Oren.
next prev parent reply other threads:[~2009-10-21 22:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 21:05 [PATCH RFC] Send checkpoint and restart debug info to a log file (v2) Serge E. Hallyn
[not found] ` <20091021210507.GA2098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 21:05 ` [PATCH user-cr] Allow for logfile for kernel debug messages (v2) Serge E. Hallyn
[not found] ` <20091021210533.GA2165-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 21:46 ` Oren Laadan
[not found] ` <4ADF8140.3010102-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-21 22:02 ` Serge E. Hallyn
[not found] ` <20091021220245.GA8994-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2009-10-21 22:18 ` Oren Laadan [this message]
[not found] ` <4ADF88BD.20400-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-22 5:56 ` Matt Helsley
2009-10-22 5:48 ` Matt Helsley
[not found] ` <20091022054853.GC7757-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-23 18:59 ` Oren Laadan
2009-10-21 22:03 ` [PATCH RFC] Send checkpoint and restart debug info to a log file (v2) Oren Laadan
[not found] ` <4ADF853F.6080807-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-21 22:49 ` Serge E. Hallyn
[not found] ` <20091021224922.GA5827-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 23:14 ` Oren Laadan
[not found] ` <4ADF95D0.8060806-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-22 0:51 ` Serge E. Hallyn
[not found] ` <20091022005157.GA11608-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-22 6:04 ` Matt Helsley
[not found] ` <20091022060400.GE7757-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-23 18:48 ` Oren Laadan
[not found] ` <4AE1FA7A.5030702-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-23 20:06 ` Serge E. Hallyn
2009-10-26 21:52 ` Serge E. Hallyn
[not found] ` <20091026215238.GA10900-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-26 23:39 ` Oren Laadan
2009-10-22 18:25 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ADF88BD.20400@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.