• intrigeri's avatar
    jenkins-slave.service: put node back online if needed (#11295, #10601) · bfb553f8
    intrigeri authored
    Waiting 30 seconds in the reboot_node job before putting the node
    back online is not always sufficient: sometimes jenkins-slave.service
    is still running at that point, and then a new test_Tails_ISO_*
    build is scheduled, which will fail early because we're rebooting
    the node.
    
    So instead:
    
     - I'll make reboot_node leave the node offline and create
       the /var/lib/jenkins/Taken_down_for_reboot flag file.
    
     - After the node has rebooted, when jenkins-slave.service starts,
       if the /var/lib/jenkins/Taken_down_for_reboot flag file exists,
       this new ExecStartPost= directive puts the node back online
       and deletes the flag file.
    
    This guarantees that the node is not brought back online
    before it has actually rebooted and is ready for new builds.
    bfb553f8