From b1ecbdfa590a7146ef61ad5a17f24bc99792b5f5 Mon Sep 17 00:00:00 2001 From: Nikita Kosenkov Date: Fri, 17 Jun 2022 15:22:20 +0300 Subject: phosphor-watchdog: changed action targets for service --- .../phosphor-watchdog/phosphor-watchdog-host-powercycle.service | 9 +++++++++ .../phosphor-watchdog/phosphor-watchdog-host-poweroff.service | 8 ++++++++ .../phosphor-watchdog/phosphor-watchdog-host-reset.service | 9 +++++++++ .../watchdog/phosphor-watchdog/phosphor-watchdog.service | 6 +++--- .../recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend | 8 +++++++- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-powercycle.service create mode 100644 meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service create mode 100644 meta-ibs/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service (limited to 'meta-ibs') 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 \ + " + + -- cgit v1.2.3