[Skiboot] [PATCH] opal-prd: Load opal-prd service after systemd-modules-load service

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Mar 9 22:14:29 AEDT 2021


On 3/9/21 3:47 PM, Dan Horák wrote:
> Hi Vasant,
> 
> On Tue,  9 Mar 2021 15:31:03 +0530
> Vasant Hegde <hegdevasant at linux.vnet.ibm.com> wrote:
> 
>> In some cases opal-prd daemon is failing to start during boot. This is
>> because systemd is trying to start service before `opal-prd` kernel module
>> load.
>>
>> 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
>>
>> Lets start opal-prd service after systemd-modules-load is started. Also
>> create conf file to load opal-prd module during boot. This will make sure
>> systemd tries to start opal-prd daemon after opal-prd kernel module load.
>>
>> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
>> ---
>>   external/opal-prd/opal-prd.service |  1 +
>>   skiboot.spec                       | 12 +++++++++++-
>>   2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/external/opal-prd/opal-prd.service b/external/opal-prd/opal-prd.service
>> index dce0dd262..cf514e498 100644
>> --- a/external/opal-prd/opal-prd.service
>> +++ b/external/opal-prd/opal-prd.service
>> @@ -2,6 +2,7 @@
>>   Description=OPAL PRD daemon
>>   ConditionVirtualization=false
>>   ConditionPathExists=/sys/firmware/devicetree/base/ibm,opal/diagnostics
>> +After=systemd-modules-load.service
>>   
>>   [Service]
>>   ExecStart=/usr/sbin/opal-prd
>> diff --git a/skiboot.spec b/skiboot.spec
>> index 38c686811..fbb21b562 100644
>> --- a/skiboot.spec
>> +++ b/skiboot.spec
>> @@ -1,5 +1,5 @@
>>   Name:		opal-prd
>> -Version:	5.10
>> +Version:	6.7
>>   Release:	1%{?dist}
>>   Summary:	OPAL Processor Recovery Diagnostics Daemon
>>   
>> @@ -11,6 +11,7 @@ ExclusiveArch:	ppc64le
>>   BuildRequires:	systemd
>>   
>>   Requires:	systemd
>> +Requires:	systemd-udev
>>   
>>   Source0:	https://github.com/open-power/skiboot/archive/v%{version}.tar.gz
>>   
>> @@ -62,6 +63,10 @@ make -C external/pflash install DESTDIR=%{buildroot} prefix=/usr
>>   mkdir -p %{buildroot}%{_unitdir}
>>   install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service
>>   
>> +# Auto-load kernel module after boot/reboot
>> +mkdir -p %{buildroot}/%{_sysconfdir}/modules-load.d
>> +echo 'opal-prd' > %{buildroot}/%{_sysconfdir}/modules-load.d/%{name}.conf
> 
> it should use the system path %{buildroot}%{_prefix}/lib/modules-load.d,
> see for example
> https://src.fedoraproject.org/rpms/s390utils/blob/rawhide/f/s390utils.spec#_239
> 
> /etc (%sysconfdir) is reserved for local admin's modifications

Oh yes. Let me fix.

> 
> Would forced loading of the opal-prd module cause any issue in pseries
> systems (eg. KVM guests)?
> 

Hmmm yeah. it will force to load prd module on guest... which is not good.


Thanks
-Vasant


More information about the Skiboot mailing list