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
|
||||
HOLD=32
|
||||
ERROR=64
|
||||
SUSPENDED=128
|
||||
|
||||
class ParallelEnvironment:
|
||||
MPI=1
|
||||
|
|
|
@ -23,6 +23,8 @@ class QstatParser:
|
|||
jobState += JobStateFlags.DELETED
|
||||
elif c == 'h':
|
||||
jobState += JobStateFlags.HOLD
|
||||
elif c == 's':
|
||||
jobState += JobStateFlags.SUSPENDED
|
||||
elif c == 'E':
|
||||
jobState += JobStateFlags.ERROR
|
||||
else:
|
||||
|
@ -42,6 +44,8 @@ class QstatParser:
|
|||
queueMachineState += QueueMachineStateFlags.ERROR
|
||||
elif c == 'o':
|
||||
queueMachineState += QueueMachineStateFlags.OBSOLETE
|
||||
elif c == 's':
|
||||
queueMachineState += QueueMachineStateFlags.SUSPENDED
|
||||
else:
|
||||
assert False, 'unhandled queue machine state flag :"' + c + '"'
|
||||
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)
|
||||
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
|
||||
SUSPENDED=32 # the queue machine is suspended
|
||||
|
||||
class QueueMachine:
|
||||
"""
|
||||
|
@ -49,6 +50,12 @@ class QueueMachine:
|
|||
return self.m_stateFlags & QueueMachineStateFlags.DISABLED
|
||||
def isInErrorState( self ):
|
||||
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 ):
|
||||
assert( self.m_strState != None )
|
||||
|
|
Loading…
Reference in New Issue