From fd3aff37a9be474ce9b7b513f60ede9bc067e176 Mon Sep 17 00:00:00 2001 From: Vijay Khemka Date: Tue, 26 Nov 2019 12:07:32 -0800 Subject: meta-facebook: Add watchdog service Added watchdog service file and also provided actionmap for watchdog timeout. (From meta-facebook rev: 7fd6185e1af3a3f04dcf30dc0b828f8eb5fae07a) Change-Id: I52394f7619ad0927ee1d6aba8a9a6784302bd673 Signed-off-by: Vijay Khemka Signed-off-by: Brad Bishop --- .../phosphor-watchdog-host-cycle.service | 10 ++++++++++ .../phosphor-watchdog-host-poweroff.service | 9 +++++++++ .../phosphor-watchdog-host-reset.service | 9 +++++++++ .../watchdog/phosphor-watchdog/phosphor-watchdog.service | 16 ++++++++++++++++ .../watchdog/phosphor-watchdog_%.bbappend | 5 +++++ 5 files changed, 49 insertions(+) create mode 100644 meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service create mode 100644 meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service create mode 100644 meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service create mode 100644 meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service create mode 100644 meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend (limited to 'meta-facebook/meta-tiogapass') diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service new file mode 100644 index 000000000..d0580bb54 --- /dev/null +++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service @@ -0,0 +1,10 @@ +[Unit] +Description=Power Cycle Host Server +Requires=host-gpio.service +After=host-gpio.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 +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.On +SyslogIdentifier=phosphor-watchdog diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service new file mode 100644 index 000000000..ddcb9dc62 --- /dev/null +++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service @@ -0,0 +1,9 @@ +[Unit] +Description=Shutdown Host Server +Requires=host-gpio.service +After=host-gpio.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-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service new file mode 100644 index 000000000..f00c9e8ab --- /dev/null +++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service @@ -0,0 +1,9 @@ +[Unit] +Description=Reset Host Server +Requires=host-gpio.service +After=host-gpio.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.Reset +SyslogIdentifier=phosphor-watchdog diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service new file mode 100644 index 000000000..f7e93b82f --- /dev/null +++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service @@ -0,0 +1,16 @@ +[Unit] +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=phosphor-watchdog-host-reset.service \ + --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=host-phosphor-watchdog-host-poweroff.service \ + --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \ + +SyslogIdentifier=phosphor-watchdog +BusName =xyz.openbmc_project.Watchdog +Type=dbus + +[Install] +WantedBy=basic.target diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend new file mode 100644 index 000000000..b0dcd093c --- /dev/null +++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +# 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 phosphor-watchdog-host-poweroff.service phosphor-watchdog-host-reset.service phosphor-watchdog-host-cycle.service" -- cgit v1.2.3