Changeset 4b256af for fedd/federation


Ignore:
Timestamp:
Dec 1, 2011 10:23:05 AM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
db3da0b
Parents:
7aaa8dc
Message:

Track rebooting/reloading better.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_segment.py

    r7aaa8dc r4b256af  
    241241        """
    242242
    243         ev_ok = ('ISUP', 'ALWAYSUP' )
     243        ev_active = ('ISUP', 'ALWAYSUP' )
     244        ev_starting = ('REBOOTED', 'REBOOTING','PXEBOOTING',
     245                'BOOTING', 'RELOADSETUP', 'RELOADING', 'RELOADDONE',
     246                'RELOADDONEV2', 'TBSETUP')
     247        ev_terminating = ( 'SHUTDOWN' )
     248
    244249
    245250        if self.debug:
     
    266271                        os = v.get('osid', None)
    267272
    268                         if st == 'up' and ev in ev_ok: st = 'active'
     273                        if st == 'up':
     274                            if ev in ev_active: st = 'active'
     275                            elif ev in ev_starting: st = 'starting'
     276                            elif ev in ev_terminating: st = 'terminating'
     277                            else: st = 'failed'
    269278                        else: st = 'failed'
    270279
Note: See TracChangeset for help on using the changeset viewer.