-
Notifications
You must be signed in to change notification settings - Fork 330
Conversation
This implements WatchTask for getting Nomad allocation logs from the Waypoint ODR.
f4a9192
to
2681e60
Compare
builtin/nomad/task.go
Outdated
task := tg.Tasks[0] | ||
|
||
// We'll give the ODR 5 minutes to start up | ||
// TODO: Make this configurable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't planned on including this in the PR, but will give it a try!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add in future PR!
Co-authored-by: Brian Cain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks pretty good now! I've got some suggestions for making the logging fit hclog's key=>value param style, otherwise I think the code makes sense! 🎉
Co-authored-by: Brian Cain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🚀
Closes #3714.
The task launcher Nomad plugin will use the Nomad API to stream logs from the Nomad allocation which is running the Waypoint on-demand runner container. These logs will be available in the log output of the static runner. This means that long after the ODR job is purged from Nomad, the ODR's logs are consumable from the static runner, which runs indefinitely, making troubleshooting of remote operations easier since previously, the ODR logs were unavailable (unless the operator quickly got the ODR's logs with
nomad logs
or in the Nomad UI before it was purged).