Bug 1322 - l'état des machines affichée par la page clusterstatus n'est pas fiable
désormais, pour éviter toute confusion, pour toutes le machines qui ne répondent pas : - le load n'est plus affiché - le bouton power affiche unknown
This commit is contained in:
parent
1e6a5247d8
commit
c0fa682d20
|
@ -7,6 +7,7 @@ class JobStateFlags:
|
||||||
DELETED=16
|
DELETED=16
|
||||||
HOLD=32
|
HOLD=32
|
||||||
ERROR=64
|
ERROR=64
|
||||||
|
SUSPENDED=128
|
||||||
|
|
||||||
class ParallelEnvironment:
|
class ParallelEnvironment:
|
||||||
MPI=1
|
MPI=1
|
||||||
|
|
|
@ -23,6 +23,8 @@ class QstatParser:
|
||||||
jobState += JobStateFlags.DELETED
|
jobState += JobStateFlags.DELETED
|
||||||
elif c == 'h':
|
elif c == 'h':
|
||||||
jobState += JobStateFlags.HOLD
|
jobState += JobStateFlags.HOLD
|
||||||
|
elif c == 's':
|
||||||
|
jobState += JobStateFlags.SUSPENDED
|
||||||
elif c == 'E':
|
elif c == 'E':
|
||||||
jobState += JobStateFlags.ERROR
|
jobState += JobStateFlags.ERROR
|
||||||
else:
|
else:
|
||||||
|
@ -42,6 +44,8 @@ class QstatParser:
|
||||||
queueMachineState += QueueMachineStateFlags.ERROR
|
queueMachineState += QueueMachineStateFlags.ERROR
|
||||||
elif c == 'o':
|
elif c == 'o':
|
||||||
queueMachineState += QueueMachineStateFlags.OBSOLETE
|
queueMachineState += QueueMachineStateFlags.OBSOLETE
|
||||||
|
elif c == 's':
|
||||||
|
queueMachineState += QueueMachineStateFlags.SUSPENDED
|
||||||
else:
|
else:
|
||||||
assert False, 'unhandled queue machine state flag :"' + c + '"'
|
assert False, 'unhandled queue machine state flag :"' + c + '"'
|
||||||
return queueMachineState
|
return queueMachineState
|
||||||
|
|
|
@ -5,6 +5,7 @@ class QueueMachineStateFlags: #
|
||||||
UNKNOWN=4 # the queue machine is in unknown state because sge_execd cannot be contected (see man qstat)
|
UNKNOWN=4 # the queue machine is in unknown state because sge_execd cannot be contected (see man qstat)
|
||||||
ERROR=8 # the queue is in error state
|
ERROR=8 # the queue is in error state
|
||||||
OBSOLETE=16 # the queue no longer exists but it is still visible because it still contains running jobs
|
OBSOLETE=16 # the queue no longer exists but it is still visible because it still contains running jobs
|
||||||
|
SUSPENDED=32 # the queue machine is suspended
|
||||||
|
|
||||||
class QueueMachine:
|
class QueueMachine:
|
||||||
"""
|
"""
|
||||||
|
@ -49,6 +50,12 @@ class QueueMachine:
|
||||||
return self.m_stateFlags & QueueMachineStateFlags.DISABLED
|
return self.m_stateFlags & QueueMachineStateFlags.DISABLED
|
||||||
def isInErrorState( self ):
|
def isInErrorState( self ):
|
||||||
return self.m_stateFlags & QueueMachineStateFlags.ERROR
|
return self.m_stateFlags & QueueMachineStateFlags.ERROR
|
||||||
|
def isResponding( self ):
|
||||||
|
return not (self.m_stateFlags & QueueMachineStateFlags.UNKNOWN)
|
||||||
|
def isInAlarmState( self ):
|
||||||
|
return self.m_stateFlags & QueueMachineStateFlags.ALARM
|
||||||
|
def isSuspended( self ):
|
||||||
|
return self.m_stateFlags & QueueMachineStateFlags.SUSPENDED
|
||||||
"""
|
"""
|
||||||
def getStateAsString( self ):
|
def getStateAsString( self ):
|
||||||
assert( self.m_strState != None )
|
assert( self.m_strState != None )
|
||||||
|
|
Loading…
Reference in New Issue