Smithx10 / nomad-driver-triton

HashiCorp Nomad Triton driver plugin
15 stars 6 forks source link

Implement RecoverTask #2

Closed Smithx10 closed 5 years ago

Smithx10 commented 5 years ago

RecoverTask doesn't attempt to do anything atm.

The behaviour of RecoverTask is as follows: When a driver is restarted it is not expected to persist any internal state to disk. To support this, Nomad will attempt to recover a task that was previously started if the driver does not recognize the task ID. During task recovery, the driver calls RecoverTask passing the TaskHandle that was built by the driver as a result of StartTask. If no error was returned, it is expected that the driver can now operate on the task by referencing the task ID. If an error occurs, the Nomad client will mark the task as lost.

https://github.com/hashicorp/nomad/blob/website/plugin-docs/website/source/docs/internals/plugins/task-drivers.html.md

Smithx10 commented 5 years ago

Got this working.