Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent does not always gracefully shut down #2678

Closed
bradrydzewski opened this issue Apr 19, 2019 · 4 comments
Closed

agent does not always gracefully shut down #2678

bradrydzewski opened this issue Apr 19, 2019 · 4 comments
Labels
Milestone

Comments

@bradrydzewski
Copy link

bradrydzewski commented Apr 19, 2019

Watchtower (utility to auto-upgrade Docker images) is not properly stopping the Agent on upgrade, which causes stuck builds. The root cause is unknown and requires more research. Hopefully it is something simple ...

@bradrydzewski bradrydzewski modified the milestones: v1.x.x, v1.2.0 Apr 19, 2019
@bradrydzewski bradrydzewski modified the milestones: v1.2.0, v.1.3.0 May 30, 2019
@bradrydzewski bradrydzewski modified the milestones: v.1.3.0, v1.x.x Aug 20, 2019
@bradrydzewski bradrydzewski changed the title Better Watchtower Support agent does not always gracefully shot down Sep 3, 2019
@bradrydzewski
Copy link
Author

bradrydzewski commented Sep 3, 2019

Note that the inability to gracefully shut down properly also impacts autoscaling. In some cases the agent receives a SIGTERM and blocks indefinitely even though no builds are running. The end result is the autoscaler runs docker stop and it takes the full timeout period to stop the container even though no builds are running.


the underlying problem is with how we used Context and has been fixed in the next upcoming iteration of the docker runner, which can be found at drone-runners/drone-runner-docker.

@bradrydzewski bradrydzewski changed the title agent does not always gracefully shot down agent does not always gracefully shut down Sep 20, 2019
@bradrydzewski bradrydzewski modified the milestones: v1.x.x, v1.7.0 Oct 4, 2019
@c2h5oh
Copy link

c2h5oh commented Oct 30, 2019

@bradrydzewski it's -t 60 or --time=60 and the unit is seconds, not minutes

@bradrydzewski
Copy link
Author

sorry, I should have been more specific ... the autoscaler does not actually call docker stop -t it makes the equivalent API call. The API requires the timeout value in milliseconds.

@bradrydzewski
Copy link
Author

we have a new implementation of the docker runner that solves this issue. This should be a drop-in replacement for the agent. Some of the environment variables changed, but we do have some logic to try and map old variables to new variables here (if something is missing please send a pull request)

drone/drone-runner-docker:latest

I am going to leave this issue open since we are still testing this runner at cloud.drone.io. Once testing is complete we will tag a release, update the documentation, and then close this issue.

bot2-harness pushed a commit that referenced this issue Sep 10, 2024
* feat: [CDE-320]: fixed strings in app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants