All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: "Bills, Jason M" <jason.m.bills@linux.intel.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: Adding support for custom SEL records
Date: Fri, 21 Oct 2022 15:34:44 -0500	[thread overview]
Message-ID: <Y1MCZNwdiZ9NC/tT@heinlein.stwcx.org.github.beta.tailscale.net> (raw)
In-Reply-To: <5994636c-b32a-0b8a-5873-a73390318fe3@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2834 bytes --]

On Wed, Oct 19, 2022 at 09:50:47AM -0600, Bills, Jason M wrote:

> I'd also be curious about the reverse question.  Is there any benefit to 
> storing logs on D-Bus that makes it a better solution?
...
> Is there a way we can now get together and define a new logging solution
> that is fully upstream and avoids the drawbacks of both existing solutions?

First and foremost I'd like to see consistency come out of this.  If
there is another proposal for how to do it that we can all consolidate
on (and people are willing to put in effort to get there) then I'm
on-board.  It seems to me like the lowest friction way to get there, with
the best maintainability, is to use the phosphor-logging APIs even if we
end up not putting them into d-bus entries.

It happens that phosphor-logging stores the instances on d-bus, but the
more important aspect to me is that we have a more consistent API for
defining and creating errors and events.  The "rsyslog-way" is that you
make very specific journal entries that the rsyslog magic knows about,
but there are a few issues with it:

    1. We don't have any consistency in what, when, and how events are
       logged.  We even have cases within the same repository (looking at
       dbus-sensors) where some of the implementations make the magic
       SEL records and others do not.  Additionally, they're not required
       to be the same format.  Some maintainers have even outright
       rejected patches with the "magic log statements".

    2. There is no way to generate something like a Redfish message
       registry for the events, because they're just arbitrary strings
       that are sprinkled around.  It isn't even easy to programatically
       search the code for them because there are 4 different approaches
       to that: cout/cerr, direct journald, phosphor-logging "v1", and
       phosphor-logging lg2.

    3. Any kind of automation around these is more at the whim of
       whatever the developers / maintainers decide to change.  It is,
       for example, really difficult for me to write data center tooling
       that reacts to events like "we just lost pgood to the host"
       because I have to read through the code to find the specific text
       and hope it never changes.

Conversely, the phosphor-logging APIs leverage YAML-based error specifiers,
which can be easily transposed into a Redfish message registry, and happen
to also be the same structure we use for inter-process errors on d-bus calls.
While I have to review the implementations to make sure they're
appropriately created, I have far less concern about them disappearing
or changing once they are in place (and I can review the changes to the YAML
specifiers to keep tabs on what changes their might be).

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2022-10-21 20:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  7:35 Adding support for custom SEL records Lei Yu
2022-10-18 20:09 ` Brad Bishop
2022-10-19  2:05   ` Lei Yu
2022-10-19 14:43     ` Brad Bishop
2022-10-19 15:50       ` Bills, Jason M
2022-10-19 17:10         ` Brad Bishop
2022-10-19 18:05           ` Bills, Jason M
2022-10-19 20:20             ` Brad Bishop
2022-10-20 13:24             ` Lei Yu
2022-10-20 14:39               ` Deng Tyler
2022-10-24 17:59             ` Ed Tanous
2022-10-24 19:03               ` Brad Bishop
2022-10-24 20:19                 ` Ed Tanous
2022-10-25 20:18                   ` Bills, Jason M
2022-10-24 22:56                 ` Vernon Mauery
2022-10-21 20:14         ` Patrick Williams
2022-10-24 22:44           ` Vernon Mauery
2022-10-21 20:34         ` Patrick Williams [this message]
2022-10-25 20:37           ` Bills, Jason M

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=Y1MCZNwdiZ9NC/tT@heinlein.stwcx.org.github.beta.tailscale.net \
    --to=patrick@stwcx.xyz \
    --cc=jason.m.bills@linux.intel.com \
    --cc=openbmc@lists.ozlabs.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.