Skip to content

Commit

Permalink
Update state machine for ssh connection when system goes to off.
Browse files Browse the repository at this point in the history
Currently when system goes to off state, we are not updating ssh
connection to disconnected state. Due to which if any tests are
having multiple IPL's then ssh API won't work once system comes
back.

This patch fixes this issue, by properly updating ssh connection
to SSHConnectionState.DISCONNECTED state when ever system
reaches standby state in state machine.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
pridhiviraj authored and stewartsmith committed Apr 28, 2017
1 parent 15051ed commit f962945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions common/OpTestSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from OpTestError import OpTestError
from OpTestHost import OpTestHost
from OpTestUtil import OpTestUtil
from OpTestHost import SSHConnectionState


class OpSystemState():
UNKNOWN = 0
Expand Down Expand Up @@ -217,6 +219,7 @@ def run_OS(self, state):
def run_POWERING_OFF(self, state):
if int(self.sys_wait_for_standby_state(BMC_CONST.SYSTEM_STANDBY_STATE_DELAY)) == 0:
print "System is in standby/Soft-off state"
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
return OpSystemState.OFF
else:
l_msg = "System failed to reach standby/Soft-off state"
Expand Down
2 changes: 0 additions & 2 deletions testcases/fspTODCorruption.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ def runTest(self):
self.tearDown()
self.cv_SYSTEM.goto_state(OpSystemState.OFF)
self.cv_SYSTEM.goto_state(OpSystemState.OS)
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
self.check_hwclock()
self.cv_SYSTEM.goto_state(OpSystemState.OFF)
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
self.set_tod()
self.cv_SYSTEM.goto_state(OpSystemState.OS)
self.check_hwclock()
Expand Down

0 comments on commit f962945

Please sign in to comment.