diff options
author | Michael Tritz <mtritz@us.ibm.com> | 2017-02-02 17:03:18 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-20 19:53:08 +0000 |
commit | 6d2f6c3dddd43c15972df379a0785d2ea2403fdc (patch) | |
tree | 02a1dd6808bd973f1e395cd0402366548a182f7e /pychassisctl | |
parent | 7812b6d7ca6b885d1ff2b7d156e1021d0e14e0f1 (diff) | |
download | talos-skeleton-6d2f6c3dddd43c15972df379a0785d2ea2403fdc.tar.gz talos-skeleton-6d2f6c3dddd43c15972df379a0785d2ea2403fdc.zip |
Go to quiesce state on checkstop/watchdog error
This change alters the behavior on a host
checkstop or watchdog error. Instead of simply
rebooting, go to the new quiesce state.
Change-Id: I4dd3a3d7a91607fc56a684873115d5f32de18f6a
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
Diffstat (limited to 'pychassisctl')
-rw-r--r-- | pychassisctl/chassis_control.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pychassisctl/chassis_control.py b/pychassisctl/chassis_control.py index 3637d82..faf7d1d 100644 --- a/pychassisctl/chassis_control.py +++ b/pychassisctl/chassis_control.py @@ -167,6 +167,14 @@ class ChassisControlObject(DbusProperties, DbusObjectManager): return None @dbus.service.method(DBUS_NAME, + in_signature='', out_signature='') + def quiesce(self): + intf = self.getInterface('systemd') + f = getattr(intf, 'StartUnit') + f.call_async('obmc-quiesce-host@0.target', 'replace') + return None + + @dbus.service.method(DBUS_NAME, in_signature='', out_signature='i') def getPowerState(self): intf = self.getInterface('power_control') @@ -199,9 +207,8 @@ class ChassisControlObject(DbusProperties, DbusObjectManager): self.softReboot() def host_watchdog_signal_handler(self): - print "Watchdog Error, Hard Rebooting" - self.Set(DBUS_NAME, "reboot", 1) - self.powerOff() + print "Watchdog Error, Going to quiesce" + self.quiesce() def emergency_shutdown_signal_handler(self, message): print "Emergency Shutdown!" |