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. 18 Jun, 2019 2 commits
  2. 17 Jun, 2019 1 commit
  3. 12 Jun, 2019 2 commits
    • Danielle Lancashire's avatar
      trt: Fix test · 1aa6bc80
      Danielle Lancashire authored
      1aa6bc80
    • Danielle Lancashire's avatar
      trhooks: Add TaskStopHook interface to services · 59335284
      Danielle Lancashire authored
      We currently only run cleanup Service Hooks when a task is either
      Killed, or Exited. However, due to the implementation of a task runner,
      tasks are only Exited if they every correctly started running, which is
      not true when you recieve an error early in the task start flow, such as
      not being able to pull secrets from Vault.
      
      This updates the service hook to also call consul deregistration
      routines during a task Stop lifecycle event, to ensure that any
      registered checks and services are cleared in such cases.
      
      fixes #5770
      59335284
  4. 14 May, 2019 3 commits
    • Michael Schurter's avatar
      client: register before restoring · 796c05b9
      Michael Schurter authored
      Registration and restoring allocs don't share state or depend on each
      other in any way (syncing allocs with servers is done outside of
      registration).
      
      Since restoring is synchronous, start the registration goroutine first.
      
      For nodes with lots of allocs to restore or close to their heartbeat
      deadline, this could be the difference between becoming "lost" or not.
      796c05b9
    • Michael Schurter's avatar
      client: do not restart dead tasks until server is contacted (try 2) · 6a2792ad
      Michael Schurter authored
      Refactoring of 104067bc
      
      Switch the MarkLive method for a chan that is closed by the client.
      Thanks to @notnoop for the idea!
      
      The old approach called a method on most existing ARs and TRs on every
      runAllocs call. The new approach does a once.Do call in runAllocs to
      accomplish the same thing with less work. Able to remove the gate
      abstraction that did much more than was needed.
      6a2792ad
    • Michael Schurter's avatar
      client: do not restart dead tasks until server is contacted · e7042b67
      Michael Schurter authored
      Fixes #1795
      
      Running restored allocations and pulling what allocations to run from
      the server happen concurrently. This means that if a client is rebooted,
      and has its allocations rescheduled, it may restart the dead allocations
      before it contacts the server and determines they should be dead.
      
      This commit makes tasks that fail to reattach on restore wait until the
      server is contacted before restarting.
      e7042b67
  5. 02 Apr, 2019 2 commits
  6. 01 Apr, 2019 1 commit
  7. 25 Mar, 2019 1 commit
    • Michael Schurter's avatar
      tests: port pre-0.9 task env tests · 2dbc06de
      Michael Schurter authored
      I chose to make them more of integration tests since there's a lot more
      plumbing involved. The internal implementation details of how we craft
      task envs can now change and these tests will still properly assert the
      task runtime environment is setup properly.
      2dbc06de
  8. 04 Mar, 2019 1 commit
    • Michael Schurter's avatar
      client: test logmon cleanup · 8d409a6e
      Michael Schurter authored
      The test is sadly quite complicated and peeks into things (logmon's
      reattach config) AR doesn't normally have access to.
      
      However, I couldn't find another way of asserting logmon got cleaned up
      without resorting to smaller unit tests. Smaller unit tests risk
      re-implementing dependencies in an unrealistic way, so I opted for an
      ugly integration test.
      8d409a6e
  9. 01 Mar, 2019 1 commit
    • Michael Schurter's avatar
      client: ensure task is cleaned up when terminal · db9daf66
      Michael Schurter authored
      This commit is a significant change. TR.Run is now always executed, even
      for terminal allocations. This was changed to allow TR.Run to cleanup
      (run stop hooks) if a handle was recovered.
      
      This is intended to handle the case of Nomad receiving a
      DesiredStatus=Stop allocation update, persisting it, but crashing before
      stopping AR/TR.
      
      The commit also renames task runner hook data as it was very easy to
      accidently set state on Requests instead of Responses using the old
      field names.
      db9daf66
  10. 22 Feb, 2019 7 commits
  11. 21 Feb, 2019 3 commits
  12. 20 Feb, 2019 2 commits
  13. 14 Feb, 2019 2 commits
  14. 12 Feb, 2019 4 commits
  15. 22 Jan, 2019 3 commits
    • Michael Schurter's avatar
      test: port TestTaskRunner_CheckWatcher_Restart · 06119e25
      Michael Schurter authored
      Added ability to adjust the number of events the TaskRunner keeps as
      there's no way to observe all events otherwise.
      
      Task events differ slightly from 0.8 because 0.9 emits Terminated every
      time a task exits instead of only when it exits on its own (not due to
      restart or kill).
      
      0.9 does not emit Killing/Killed for restarts like 0.8 which seems fine
      as `Restart Signaled/Terminated/Restarting` is more descriptive.
      
      Original v0.8 events emitted:
      ```
      	expected := []string{
      		"Received",
      		"Task Setup",
      		"Started",
      		"Restart Signaled",
      		"Killing",
      		"Killed",
      		"Restarting",
      		"Started",
      		"Restart Signaled",
      		"Killing",
      		"Killed",
      		"Restarting",
      		"Started",
      		"Restart Signaled",
      		"Killing",
      		"Killed",
      		"Not Restarting",
      	}
      ```
      06119e25
    • Michael Schurter's avatar
      test: port RestartTask from 0.8 · 81334cd3
      Michael Schurter authored
      81334cd3
    • Michael Schurter's avatar
      test: port SignalFailure test from 0.8 · 418d360d
      Michael Schurter authored
      Also fix signal error handling in mock_driver.
      418d360d
  16. 18 Jan, 2019 1 commit
  17. 15 Jan, 2019 1 commit
  18. 14 Jan, 2019 1 commit
  19. 07 Jan, 2019 1 commit
  20. 19 Dec, 2018 1 commit