openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Johnathan Mantey <johnathanx.mantey@intel.com>
Cc: "Doman, Jonathan" <jonathan.doman@intel.com>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: Checking for network online
Date: Wed, 23 Feb 2022 07:58:45 -0600	[thread overview]
Message-ID: <YhY9lX6a8RDGcY2K@heinlein> (raw)
In-Reply-To: <5c14f9f8-886e-236d-3953-47c27f1e61bd@intel.com>

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

On Fri, Feb 18, 2022 at 11:39:03AM -0800, Johnathan Mantey wrote:
> On 2/18/22 11:04, Doman, Jonathan wrote:
> > On Thu, 2022-02-17 at 14:54 -0800, Johnathan Mantey wrote:

> > 
> > Did you try removing the Wants/After=network-online.target from
> > rsyslog.service to see if the situation improves? If it does, then we
> > can discuss removing that dependency or making it configurable.
> 
> No, I had not tried that. My take on doing so is that it'll be like 
> playing whack a mole. Some other service may decide to rely on 
> systemd-networkd-wait-online. The issue is now compounded as a result.

I don't understand why this is a particularly difficult problem.  You asked me
on Discord how I figured this out and I said "grep".  You literally just look
for a service that depends on `network-online.target`.

No service should depend on systemd-networkd-wait-online directly.  If they do,
this is a bug.  They are always depending on network-online.target.

Services depend on network-online.target for valid reasons.  As far as I can
tell, currently, only rsyslog* has this dependency (at least on Witherspoon and
Bletchley).  If a new service adds this dependency, and you have an issue with
it, I think you should take some time to reason about why this dependency was
added rather than simply ignoring it (by a force-disable on
systemd-networkd-wait-online).

"Fixing" the rsyslog dependency in your system is a pretty trivial
`do_install:append` with a `sed` in it to strip out the line.  Catching new
dependencies is a fairly simple `ROOTFS_POSTPROCESS_COMMAND` to check all the
service files in `/lib/systemd/system` for a `network-online.target` dependency.

* As I mentioned in Discord, rsyslog having this dependency by default makes
  good sense from the upstream's perspective.  rsyslog is _typically_
  configured for remote offload of the syslog (hence, r in rsyslog).  It just
  happens that we have this unusual Rube Goldberg transformation using rsyslog
  for formulating the SEL and Redfish log files.  For that transformation the
  dependency isn't necessary, but for people who use rsyslog as it is intended
  they probably want the dependency (as I've mentioned in another email we do).

-- 
Patrick Williams

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

  reply	other threads:[~2022-02-23 13:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 22:54 Checking for network online Johnathan Mantey
2022-02-18  0:11 ` Jeremy Kerr
2022-02-18  2:29   ` Lei Yu
2022-02-18 16:11     ` Johnathan Mantey
2022-02-23  2:09       ` Jiaqing Zhao
2022-02-23 13:48         ` Patrick Williams
2022-02-23 17:44           ` Jiaqing Zhao
2022-02-23 18:36             ` Bills, Jason M
2022-02-23 18:58               ` Patrick Williams
2022-02-23 18:55             ` Patrick Williams
2022-02-23 20:04             ` Johnathan Mantey
2022-02-24 20:09               ` Patrick Williams
2022-03-02  6:15                 ` Jiaqing Zhao
2022-03-01 19:56             ` Milton Miller II
2022-02-18 19:04 ` Doman, Jonathan
2022-02-18 19:39   ` Johnathan Mantey
2022-02-23 13:58     ` Patrick Williams [this message]
2022-03-02  6:24 ` Ratan Gupta

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=YhY9lX6a8RDGcY2K@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=johnathanx.mantey@intel.com \
    --cc=jonathan.doman@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).