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

Oliver O'Halloran oohall at gmail.com
Thu Feb 27 22:39:51 AEDT 2020


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?


> 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
>


More information about the Skiboot mailing list