-
Notifications
You must be signed in to change notification settings - Fork 327
Tasks running the wrong command when built and deployed with v0.3.2 #1579
Comments
Hey there @ragesoss ! Thanks for opening an issue with Waypoint. I noticed in your waypoint.hcl that your deploy step is just running nomad directly: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/waypoint.hcl#L35-L41 deploy {
use "exec" {
command = ["nomad","run","<TPL>"]
template {
path = "${path.app}/job.hcl.tpl"
}
}
} I don't think there are any exec plugin changes between 0.3.1 and 0.3.2. Is it possible the job.hcl.tpl file changed between upgrades in your waypoint client binary? If you were using the nomad plugin to deploy, I could see this potentially being a Waypoint bug, but since the deploy step is using exec and Waypoint is using nomad directly, I wonder if the behavior you are seeing could be reproduced by doing a |
@briancain thanks! I'll look into these suggestions. |
The problem does appear to be specific to the
I attempted to run
|
@ragesoss - thanks for the extra info, could you provide us with two gists: one of
Oops, I should have caught that. That's correct, Waypoint injects some env variables into the job file to work with Nomad and the |
@briancain: yes, I've just run them with -vvv and captured the gists: |
Hey there @ragesoss! Thank you for providing those gists. I've done a bit of digging into why this might be happening with your project. We are pretty sure this change between the versions you mentioned was initially caused by upgrading the version of pack that Waypoint uses, #1457, which was needed to fix other bugs related to pack. One thing I noticed between the two docker images built on version We're still looking into the cause, but hopefully that gives you something to go off of to get you unblocked. Thanks for all of the information you provided here! 🙏🏻 |
Thanks! The |
(That didn't work, as it looks like the buildpack isn't compatible with buildpack API |
This makes the jobspec compatible with Waypoint 0.3.2 and up. Waypoint 0.3.2 included a version bump of `pack`, which in turn bumped `lifecycle`, which introduced setting the `web` process as the default process type for the image. Adding a default process type meant that Nomad would use the entrypoint for the default process type unless another entrypoint is specified. So instead of simply running the command for the sidekiq task, it would run the default web entrypoint and use the `command` as arguments. We intend for the `command` and `args` to completely specify how to launch the container for any each task, so we specify the base buildpack `launcher` command as the entrypoint for each job. Relevant context: hashicorp/waypoint#1579
Okay! I think I've got an understanding of what was going wrong (although I'm not 100% confident that I've got the right picture). The fix was to add For images built by the older Relevant doc: https://www.nomadproject.io/docs/drivers/docker#entrypoint So I guess this probably isn't a bug in Thanks much for the help, @briancain! |
Describe the bug
For the last month or so, I've been using Waypoint in conjunction with Docker, Nomad, and Consul to run a Rails app, Wiki Education Dashboard. I recently upgraded the
waypoint
client on my development machine from 0.3.1 to 0.3.2, and since the first time I built new Docker images of the app and deployed them (ie,waypoint up
) with version 0.3.2 (yesterday), the behavior of the system changed: the "sidekiq" tasks stopped working, although they were allocated and appeared to be running. I found that each of the "sidekiq" tasks appeared (according tostdout
on the Nomad UI) to be running the wrong command,puma
, which corresponds to the web server task rather than the sidekiq task.I downgraded my Waypoint client to 0.3.1 and then ran
waypoint deploy
(to redeploy the images previously built and deployed with 0.3.2), but this did not fix the problem. Runningwaypoint up
with 0.3.1 to both rebuild the Docker images and deploy them did successfully fix the problem, getting the sidekiq allocations runningsidekiq
instead ofpuma
.See:
Expected behavior
Waypoint tasks should run the the command specified for their own config, not the command for another task's config.
Waypoint Platform Versions
pack
Additional context
Here is the infrastructure repo that we're running this on: https://github.com/WikiEducationFoundation/wikieduinfra
cc @nateberkopec, who developed our waypoint configuration.
The text was updated successfully, but these errors were encountered: