Changeset 866


Ignore:
Timestamp:
05/15/13 22:34:08 (7 years ago)
Author:
ramonb
Message:

jobmond.py:

  • added down/offline node detection for SLURM
  • state: down = down, drain = offline
  • see #162
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/jobmond/jobmond.py

    r864 r866  
    854854        # Report down/offline nodes in batch (PBS only ATM)
    855855        #
    856         if BATCH_API == 'pbs':
     856        if BATCH_API in [ 'pbs', 'slurm' ]:
    857857
    858858            domain        = fqdn_parts( socket.getfqdn() )[1]
     
    12591259    def getNodeData( self ):
    12601260
    1261         slurm_type = pyslurm.node()
    1262 
    1263         nodedict = slurm_type.get()
     1261        slurm_type  = pyslurm.node()
     1262
     1263        slurm_nodes = slurm_type.get()
     1264
     1265        nodedict    = { }
     1266
     1267        for node, attrs in slurm_nodes.items():
     1268
     1269            ( num_state, name_state ) = attrs['node_state']
     1270
     1271            if name_state == 'DOWN':
     1272
     1273                nodedict[ node ] = { 'state' : 'down' }
     1274
     1275            elif name_state == 'DRAIN':
     1276
     1277                nodedict[ node ] = { 'state' : 'offline' }
    12641278
    12651279        return nodedict
Note: See TracChangeset for help on using the changeset viewer.