Home
last modified time | relevance | path

Searched hist:"7 a787dd7cfa4c52f1842e40a6757cccc8ca356d6" (Results 1 – 1 of 1) sorted by relevance

/openbmc/phosphor-state-manager/
H A Dobmcutil7a787dd7cfa4c52f1842e40a6757cccc8ca356d6 Thu Oct 31 06:02:31 CDT 2019 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> Add support for recoveryoff and recoveron

During early stages of system bringup, it is beneficial to have the system in
fail state, so that the issue can be debugged faster, instead of getting into
recovery mode.

Disabling the automatic reboot from Quiesce state and not handling the boot
watchdog timeout would help with this.

When phosphor-watchdog times out, it starts obmc-host-timeout@0.target
to get the BMC through recovery process. This patchset adds mask and unmask
on that target to support recoveryoff and recoveryon respectively

Tested:
.......

Scenario-1: Disable recovery, start Watchdog and enable it:

/tmp# ./obmcutil recoveryoff
Created symlink /etc/systemd/system/obmc-host-timeout@0.target → /dev/null.

/lib/systemd/system/obmc-host-startmin@0.target.wants# obmcutil state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off

phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog
--path=/xyz/openbmc_project/watchdog/host0 --target=obmc-host-timeout@0.target &

busctl call `mapper get-service /xyz/openbmc_project/watchdog/host0`
/xyz/openbmc_project/watchdog/host0 org.freedesktop.DBus.Properties Set ssv
xyz.openbmc_project.State.Watchdog Enabled b true

phosphor-watchdog[2050]: watchdog: enabled and started

phosphor-watchdog[2050]: watchdog: Timed out

phosphor-watchdog[2050]: watchdog: Failed to start unit

phosphor-watchdog[2050]: watchdog: disabled

CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off

....................................

Scenario-2: Enable recovery and enable watchdog:

/tmp# ./obmcutil recoveryon
Removed /etc/systemd/system/obmc-host-timeout@0.target.

CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off

busctl call `mapper get-service /xyz/openbmc_project/watchdog/host0`
/xyz/openbmc_project/watchdog/host0 org.freedesktop.DBus.Properties Set ssv
xyz.openbmc_project.State.Watchdog Enabled b true

Oct 31 10:50:45 phosphor-watchdog[2050]: watchdog: enabled and started

Oct 31 10:51:15 phosphor-watchdog[2050]: watchdog: Timed out
Oct 31 10:51:15 systemd[1]: unit_file_find_fragment: obmc-host-timeout@.target+0 →
obmc-host-timeout@0.target

Oct 31 10:51:15 phosphor-watchdog[2050]: watchdog: disabled

Oct 31 10:51:15 systemd[1]: Stopped target Power0 Host Off.
Oct 31 10:51:16 systemd[1]: Stopped target Chassis0 (Power Off).

Oct 31 10:51:16 watchdog_timeout[2249]: Host watchdog timed out

Oct 31 10:51:16 systemd[1]: Reached target Quiesce Target.
Oct 31 10:51:17 systemd[1]: Started Reboot host0.
-------------------------------------------------

Change-Id: I3ea030666c6198f9638efd7201805dcecf41b6a6
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>