The Subscription will disappear and config of EventService restore initial value after reboot

Jun-Lin Chen (陳俊霖) Jun-Lin.Chen at quantatw.com
Wed Nov 25 13:39:07 AEDT 2020


Hi milton,

I add 'mkdir' command to bmcweb.bbappend then it will create directory while building image. It works normally now. Thank you for your suggestion.

Jim

-----Original Message-----
From: Milton Miller II <miltonm at us.ibm.com>
Sent: Friday, November 20, 2020 2:37 PM
To: Jun-Lin Chen (陳俊霖) <Jun-Lin.Chen at quantatw.com>
Cc: openbmc at lists.ozlabs.org
Subject: Re: The Subscription will disappear and config of EventService restore initial value after reboot

On November 19, 2020 around 11:47PM in some timezone, Jun-Lin Chen (陳俊霖) wrote:

> Hi,
> I have an issue about EventService: after reboot, Subscription 
>disappear and config of EventService restore initial value.
> I look up the codes in event_service_manager.hpp and found 
>Subscription and EventService config will store i 
>/var/lib/bmcweb/eventservice_config.json.
> But If BMC has no bmcweb folder in /var/lib/ , It not save 
>eventservice_config.json.
>  
> I try create bmcweb folder manually and POST a new Subscription then 
>reboot, the Subscription will be saved and not disappear this time.
> This performance seems to be inconsistent with the design concept if 
>there is no bmcweb folder at the beginning. Does need to add to the 
>code that detect the path is valid?
>  

Rather than add to the code to detect if the path is valid, add to the service  script a presetup command that does 
'mkdir -p /var/lib/bmcweb/' to create the directory.   Ideally this 
would be written to have the path in a meson variable that is built into a configuration .h file and into the service file using variable substition to make sure the path in the code is the same as the directory in the service file.

milton


> Jim>  
>     



More information about the openbmc mailing list