#NEWLINE# def _cleaning_reboot( self , task ) : #NEWLINE# #INDENT# "Reboots a node out of band after a clean step that requires it.\n\n        If an agent clean step has 'reboot_requested': True, reboots the\n        node when the step is completed. Will put the node in CLEANFAIL\n        if the node cannot be rebooted.\n\n        :param task: a TaskManager instance\n        " #NEWLINE# try : #NEWLINE# #INDENT# manager_utils . node_power_action ( task , states . REBOOT ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# msg = ( _ ( 'Reboot requested by clean step %(step)s failed for node %(node)s: %(err)s' ) % { #NEWLINE# #INDENT# 'step' : task . node . clean_step , #NEWLINE# 'node' : task . node . uuid , #NEWLINE# 'err' : e , #NEWLINE# #UNINDENT# } ) #NEWLINE# LOG . error ( msg ) #NEWLINE# manager_utils . cleaning_error_handler ( task , msg ) #NEWLINE# return #NEWLINE# #UNINDENT# driver_internal_info = task . node . driver_internal_info #NEWLINE# driver_internal_info [ 'cleaning_reboot' ] = True #NEWLINE# task . node . driver_internal_info = driver_internal_info #NEWLINE# task . node . save ( )