VirtualBox

Ignore:
Timestamp:
Mar 11, 2019 10:03:19 AM (6 years ago)
Author:
vboxsync
Message:

vsheriff: enable automatic rebooting/disabling of testboxes which are failing a lot, with email alert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py

    r77644 r77645  
    480480            # history and at least three in the last 10 results.
    481481            if iFirstOkay >= 2 and cBad > 2:
    482                 # Frank: For now don't reboot boxes automatically
    483                 if True or oTestBoxLogic.hasTestBoxRecentlyBeenRebooted(idTestBox, cHoursBack = cHoursBack, tsNow = tsNow):
    484                     self.vprint(u'Disabling testbox #%u (%s) - iFirstOkay=%u cBad=%u cOkay=%u'
    485                                 % ( idTestBox, oTestBox.sName, iFirstOkay, cBad, cOkay));
     482                if oTestBoxLogic.hasTestBoxRecentlyBeenRebooted(idTestBox, cHoursBack = cHoursBack, tsNow = tsNow):
     483                    sComment = u'Disabling testbox #%u (%s) - iFirstOkay=%u cBad=%u cOkay=%u' \
     484                             % (idTestBox, oTestBox.sName, iFirstOkay, cBad, cOkay);
     485                    self.vprint(sComment);
     486                    self.sendEmailAlert(self.uidSelf, sComment);
    486487                    if self.oConfig.fRealRun is True:
    487488                        try:
     
    492493                            rcExit = self.eprint(u'Error disabling testbox #%u (%u): %s\n' % (idTestBox, oTestBox.sName, oXcpt,));
    493494                else:
    494                     self.vprint(u'Rebooting testbox #%u (%s) - iFirstOkay=%u cBad=%u cOkay=%u'
    495                                 % ( idTestBox, oTestBox.sName, iFirstOkay, cBad, cOkay));
     495                    sComment = u'Rebooting testbox #%u (%s) - iFirstOkay=%u cBad=%u cOkay=%u' \
     496                             % (idTestBox, oTestBox.sName, iFirstOkay, cBad, cOkay);
     497                    self.vprint(sComment);
     498                    self.sendEmailAlert(self.uidSelf, sComment);
    496499                    if self.oConfig.fRealRun is True:
    497500                        try:
     
    504507                self.dprint(u'badTestBoxManagement: #%u (%s) looks ok:  iFirstOkay=%u cBad=%u cOkay=%u'
    505508                            % ( idTestBox, oTestBox.sName, iFirstOkay, cBad, cOkay));
     509
    506510        #
    507511        # Reset hanged testboxes
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette