Commit b7460f1e authored by Marco Mariani's avatar Marco Mariani

also log transition to None

parent 0a9ccd35
...@@ -10,11 +10,14 @@ import tempfile ...@@ -10,11 +10,14 @@ import tempfile
import traceback import traceback
import time import time
import xmlrpclib import xmlrpclib
import slapos.slap import slapos.slap
from slapos.grid.utils import setRunning, setFinished from slapos.grid.utils import setRunning, setFinished
from erp5.util.taskdistribution import TaskDistributionTool, RPCRetry from erp5.util.taskdistribution import TaskDistributionTool, RPCRetry
from erp5.util.taskdistribution import SAFE_RPC_EXCEPTION_LIST from erp5.util.taskdistribution import SAFE_RPC_EXCEPTION_LIST
class AutoSTemp(object): class AutoSTemp(object):
""" """
Create a self-destructing temporary file. Create a self-destructing temporary file.
...@@ -292,19 +295,21 @@ class SoftwareReleaseTester(RPCRetry): ...@@ -292,19 +295,21 @@ class SoftwareReleaseTester(RPCRetry):
Check for missed deadlines (-> test failure), conditions for moving to Check for missed deadlines (-> test failure), conditions for moving to
next state, and actually moving to next state (executing its payload). next state, and actually moving to next state (executing its payload).
""" """
self._logger.debug('TIC')
deadline = self.deadline deadline = self.deadline
if deadline < now and deadline is not None: if deadline < now and deadline is not None:
raise TestTimeout(self.state) raise TestTimeout(self.state)
_, _, next_state, software_state, instance_state = self.transition_dict[ _, _, next_state, software_state, instance_state = self.transition_dict[
self.state] self.state]
if (software_state is None or if (software_state is None or
software_state == self._getSoftwareState()) and ( software_state == self._getSoftwareState()) and (
instance_state is None or instance_state is None or
instance_state == self._getInstanceState()): instance_state == self._getInstanceState()):
self._logger.debug('Going to state %s (%r, %r)', next_state,
software_state, instance_state)
if next_state is None: if next_state is None:
return None return None
self._logger.debug('Going to state %i (%r, %r)', next_state,
software_state, instance_state)
self.state = next_state self.state = next_state
stepfunc, delay, _, _, _ = self.transition_dict[next_state] stepfunc, delay, _, _, _ = self.transition_dict[next_state]
self.deadline = now + delay self.deadline = now + delay
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment