The Subscription will disappear and config of EventService restore initial value after reboot
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 in /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?
Jim
Quoted 9 lines · Jun-Lin Chen (陳俊霖)
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.
Quoted 6 lines
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
Quoted 2 lines
Jim>
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 <[email protected]>
Sent: Friday, November 20, 2020 2:37 PM
To: Jun-Lin Chen (陳俊霖) <[email protected]>
Cc: [email protected]
Subject: Re: The Subscription will disappear and config of EventService restore initial value after reboot
Quoted 9 lines · Jun-Lin Chen (陳俊霖)
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.
Quoted 6 lines
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
Quoted 2 lines
Jim>