summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kosenkov <NKosenkov@IBS.RU>2022-06-17 15:22:20 +0300
committerNikita Kosenkov <NKosenkov@IBS.RU>2022-06-17 15:22:20 +0300
commitb1ecbdfa590a7146ef61ad5a17f24bc99792b5f5 (patch)
tree2e58a01e858efd4c1063bd653d57b543d92af45b
parentb510ab611bf67fa3586db79addc8383f8c331676 (diff)
downloadopenbmc-b1ecbdfa590a7146ef61ad5a17f24bc99792b5f5.tar.xz
phosphor-watchdog: changed action targets for service
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-powercycle.service9
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service8
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service9
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service6
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend8
5 files changed, 36 insertions, 4 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-powercycle.service b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-powercycle.service
new file mode 100644
index 0000000000..9b8b0d6913
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-powercycle.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Power Cycle Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
new file mode 100644
index 0000000000..af7e6ef0da
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Shutdown Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
new file mode 100644
index 0000000000..655618b057
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Reset Host Server
+After=xyz.openbmc_project.Chassis.Control.Power.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s xyz.openbmc_project.State.Host.Transition.ForceWarmReboot
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
index 6c069febec..bccd41cd10 100644
--- a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
+++ b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
@@ -4,9 +4,9 @@ Description=Phosphor Watchdog
[Service]
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
--path=/xyz/openbmc_project/watchdog/host0 \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=xyz.openbmc_project.State.Host.Transition.ForceWarmReboot \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=xyz.openbmc_project.State.Chassis.Transition.Off \
- --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=xyz.openbmc_project.State.Chassis.Transition.PowerCycle
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=phosphor-watchdog-host-poweroff.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-powercycle.service \
SyslogIdentifier=phosphor-watchdog
BusName=xyz.openbmc_project.Watchdog
diff --git a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
index b6cbdac9c2..89c74bd9d6 100644
--- a/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
+++ b/meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -6,4 +6,10 @@ SRC_URI += "file://0001-Customize-phosphor-watchdog-for-Intel-platforms.patch \
# Remove the override to keep service running after DC cycle
SYSTEMD_OVERRIDE:${PN}:remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
-SYSTEMD_SERVICE:${PN} = "phosphor-watchdog.service"
+SYSTEMD_SERVICE:${PN} = " phosphor-watchdog.service \
+ phosphor-watchdog-host-reset.service \
+ phosphor-watchdog-host-poweroff.service \
+ phosphor-watchdog-host-powercycle.service \
+ "
+
+