[Skiboot] [PATCH] opal-prd: Add RestartSec to service script

Dan Horák dan at danny.cz
Thu Feb 27 23:29:09 AEDT 2020


On Thu, 27 Feb 2020 22:39:51 +1100
"Oliver O'Halloran" <oohall at gmail.com> wrote:

> On Thu, Feb 27, 2020 at 5:01 PM Vasant Hegde
> <hegdevasant at linux.vnet.ibm.com> wrote:
> >
> > We are seeing random failure of `opal-prd` during boot. Its failing
> > during boot mostly because prd module is not yet loaded.
> 
> Ehhhhh, surely systemd has some way to specify that the opal-prd
> service depends on the driver being loaded?

yup, a systemd service should be able to wait, I have found
https://lists.fedoraproject.org/pipermail/devel/2012-January/160917.html


		Dan
 
> 
> > Sample failure message:
> > ----------------------
> > Feb 21 19:03:09 grsp1 opal-prd: FW: Can't open PRD
> > device /dev/opal-prd: No such file or directory Feb 21 19:03:09
> > grsp1 opal-prd: FW: Error initialising PRD channel
> >
> > We have `Restart` option in service script. But systemd will
> > attempt to restart as soon as it fails and stops after few attempts
> > (by default it retries for 5 times). This patch add `RestartSec`
> > option to service script
> >
> > RestartSec = Configures the time to sleep before restarting a
> > service.
> >
> > Note that I have pickedup 30sec as wait time. Before this change we
> > hit `opal-prd` failure within 50 reboots. With this fix 200 reboots
> > went fine without any failure.
> >
> > Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> > ---
> >  external/opal-prd/opal-prd.service | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/external/opal-prd/opal-prd.service
> > b/external/opal-prd/opal-prd.service index dce0dd262..755b5f45c
> > 100644
> > --- a/external/opal-prd/opal-prd.service
> > +++ b/external/opal-prd/opal-prd.service
> > @@ -6,6 +6,7 @@
> > ConditionPathExists=/sys/firmware/devicetree/base/ibm,opal/diagnostics
> > [Service] ExecStart=/usr/sbin/opal-prd
> >  Restart=always
> > +RestartSec=30
> >
> >  [Install]
> >  WantedBy=multi-user.target
> > --
> > 2.21.1
> >
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list