Check on bypass phosphor-discover-system-state at .service if BMC not boot from A/C

Thang Nguyen OS thang at amperemail.onmicrosoft.com
Mon Feb 21 16:51:56 AEDT 2022


On 18/02/2022 23:14, Andrew Geissler wrote:
> [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.]
>
>
>> On Feb 18, 2022, at 1:36 AM, Thang Nguyen OS <thang at amperemail.onmicrosoft.com> wrote:
> < snip>
>> # busctl get-property xyz.openbmc_project.State.BMC /xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC LastRebootCause
>>
>> s "xyz.openbmc_project.State.BMC.RebootCause.POR"
>>
>> I would like to check if you have any idea on how to use the above information to prevent the power restore policy executed in case of BMC reboot.
>>
> Sounds a lot like what I’m doing in https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/50706. IBM has a requirement to not
> start power restore policy when the system is reset due to a pinhole reset. I imagine you could just add a check like mine for yours as well.

Thanks a lot for your information. It works for me. I tested on my 
Mt.Jade system with adding condition to bypass the policy when 
bmcRebootCause is xyz.openbmc_project.State.BMC.RebootCause.Watchdog

      } else if (bmcRebootCause ==
         "xyz.openbmc_project.State.BMC.RebootCause.Watchdog")
     {
         info(
             "BMC was reset due to soft reset, no power restore policy 
will be run");
         return 0;
     }

>
>>
>> Thanks,
>>
>> Thang Q. Nguyen
>>


More information about the openbmc mailing list