Add precondition checks on psu sensor service

This will prevent the psu sensor from restarting when powercycle is
happening.

Tested:
before the change:

Apr 02 14:33:23 dddhd28-nfd01.prod.google.com tray_powercycle.sh[8370]: Terminated
Apr 02 14:33:23 dddhd28-nfd01.prod.google.com tray_powercycle.sh[8370]: This service has been killed...
Apr 02 14:33:23 dddhd28-nfd01.prod.google.com tray_powercycle.sh[8370]: Stopping psusensor_monitor

Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: chassis-system-reset.service: State 'stop-sigterm' timed out. Killing.
Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: chassis-system-reset.service: Killing process 8370 (tray_powercycle) with signal SIGKILL.
Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: chassis-system-reset.service: Killing process 8533 (sleep) with signal SIGKILL.
Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: chassis-system-reset.service: Main process exited, code=killed, status=9/KILL
Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: chassis-system-reset.service: Failed with result 'timeout'.
Apr 02 14:34:54 dddhd28-nfd01.prod.google.com systemd[1]: Stopped System unit to hard reset or system reset chassis.

after the change:

Apr 02 14:36:19 dddgy20-nfd01.prod.google.com tray_powercycle.sh[5385]: Stopping psusensor_monitor
Apr 02 14:36:19 dddgy20-nfd01.prod.google.com tray_powercycle.sh[5385]: Stop msvfud
Apr 02 14:36:19 dddgy20-nfd01.prod.google.com tray_powercycle.sh[5392]: {"Staged State":"UPDATED"}
Apr 02 14:36:19 dddgy20-nfd01.prod.google.com tray_powercycle.sh[5385]: fake bios update start

Apr 02 14:36:40 dddgy20-nfd01.prod.google.com systemd[1]: PSU Sensor was skipped because of an unmet condition check (ConditionPathExists=!/run/powercycle_ongoing).

Apr 02 14:41:19 dddgy20-nfd01.prod.google.com tray_powercycle.sh[5385]: powercycle happened!

https://fusion2.corp.google.com/2997dddd-e925-331d-a89b-1161f483a6e2

Google-Bug-Id: 332538728
Change-Id: I994d9d40d2ac143400252d46c80f2845febe8750
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
2 files changed
tree: 604bc9e6585474cc614d11d127cb563a53db0cad
  1. conf/
  2. dynamic-layers/
  3. recipes-bsp/
  4. recipes-connectivity/
  5. recipes-core/
  6. recipes-devtools/
  7. recipes-extended/
  8. recipes-google/
  9. recipes-kernel/
  10. recipes-phosphor/
  11. recipes-tpm1/
  12. LICENSE
  13. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.