This project is mirrored from https://gitee.com/mirrors/nomad.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 12 May, 2021 2 commits
  2. 11 May, 2021 1 commit
  3. 10 May, 2021 5 commits
  4. 07 May, 2021 15 commits
  5. 06 May, 2021 5 commits
  6. 05 May, 2021 6 commits
  7. 04 May, 2021 2 commits
    • Mahmood Ali's avatar
      drivers: Capture exit code when task is killed (#10494) · 61a3b73d
      Mahmood Ali authored
      This commit ensures Nomad captures the task code more reliably even when the task is killed. This issue affect to `raw_exec` driver, as noted in https://github.com/hashicorp/nomad/issues/10430 .
      
      We fix this issue by ensuring that the TaskRunner only calls `driver.WaitTask` once. The TaskRunner monitors the completion of the task by calling `driver.WaitTask` which should return the task exit code on completion. However, it also could return a "context canceled" error if the agent/executor is shutdown.
      
      Previously, when a task is to be stopped, the killTask path makes two WaitTask calls, and the second returns "context canceled" occasionally because of a "race" in task shutting down and depending on driver, and how fast it shuts down after task completes.
      
      By having a single WaitTask call and consistently waiting for the task, we ensure we capture the exit code reliably before the executor is shutdown or the contexts expired.
      
      I opted to chang...
      61a3b73d
    • Drew Bailey's avatar
      1907b8a8
  8. 03 May, 2021 4 commits