All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Geissler <geissonator@gmail.com>
To: Xo Wang <xow@google.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: How to deal with failing services in the boot targets
Date: Wed, 25 Jan 2017 18:33:33 -0600	[thread overview]
Message-ID: <CALLMt=rg+Zu_A0abRATHXqW3FbF5Yv7Q5tqgKkGc=vowvObASA@mail.gmail.com> (raw)
In-Reply-To: <CAPH-5w4WA8aVbKA0ptR7ubtpCUuGxZ2RQpuS0W4m1csen-kU-w@mail.gmail.com>

Hey Xo,

Pretty perfect timing on this email, my new story for this sprint is
https://github.com/openbmc/openbmc/issues/1033 (handle service
failures in openbmc) precisely for the reasons you mentioned above.

We've had a few hallway talks but not much in the way of design yet.
One thought was to use the "OnFailure=" tag to start up a target that
conflicts with everything (to stop everything) and puts the system
into some sort of "termination" state.

We have two different types of targets in openbmc.  The one's that
have "wants' relationships (i.e. run these services) and targets that
are more for synchronization among those services.  I recently added a
new chassis power "wants" target, I think I'll need to add some
dependencies that you mention above there, so if someone starts the
"boot host" target, it will automatically run the "turn on power"
target.

Anyway, hope to have a few more thoughts on this out by the end of
this week.  Will do some experimenting with your notes.

Andrew

On Wed, Jan 25, 2017 at 5:29 PM, Xo Wang <xow@google.com> wrote:
> Hi folks,
>
> I'm seeing vcs-on@0.service failing occasionally. I know the cause of
> it (i2c errors) but I'd like to know how to deal with failing services
> in the context of OpenBMC boot sequencing.
>
> For example, the service failure isn't reflect by any subsequent
> target failures (it reaches obmc-chassis-start@0.target with no
> command line errors, only a journal error for vcs-on@0.service
> itself), nor did it prevent the boot from proceeding to pdbg host
> control.
>
> This is expected behavior given the systemd Unit relationships I used,
> but I don't see a clean way to make a unit like vcs-on@.service block
> the boot.
>
> I tried making vcs-on@.service [Install]
> RequiredBy=obmc-chassis-start@%i.target (and modifying the service
> install similarly), but this only prints out a message that
> obmc-chassis-start@0.target couldn't be reached due to its failed
> dependency. It did not stop the pdbg start IPL.
>
> I also tried RequiredBy=obmc-host-start-pre@%i.target. This turned out
> even worse because our targets don't require their precedent targets,
> so obmc-host-start@0.target is still reachable even with a failure in
> obmc-host-start-pre@0.target. Likewise for
> obmc-chassis-start@0.target, which now prints no console error at all.
>
> Finally I could add RequiredBy=start_host@%i.service to
> vcs-on@0.service, but this seems fragile compared to using the targets
> as synchronization points.
>
> 1) How should I make a host boot service be a blocking step in the chain?
>
> 2) Will this require a structural change in the OpenBMC targets?
> Making targets require their precedent targets comes to mind. This
> would make targets useful not only for sequencing but also for
> dependency checking.
>
> 3) Do other people also want this? To me it seems obvious that failure
> to power on should always block starting IPL, but maybe somebody else
> has a good reason to use weaker relationships.
>
> thanks
> xo
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc

  reply	other threads:[~2017-01-26  0:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 23:29 How to deal with failing services in the boot targets Xo Wang
2017-01-26  0:33 ` Andrew Geissler [this message]
2017-01-27  1:16 ` Andrew Jeffery
2017-02-01 20:42   ` Andrew Geissler
2017-02-03  6:40     ` Andrew Jeffery
2017-02-09 16:32       ` Andrew Geissler
2017-02-09 19:28         ` Xo Wang

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='CALLMt=rg+Zu_A0abRATHXqW3FbF5Yv7Q5tqgKkGc=vowvObASA@mail.gmail.com' \
    --to=geissonator@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=xow@google.com \
    /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.