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>
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 @@
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 @@
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!"