Skip to content

Commit

Permalink
Merge pull request #3601 from hashicorp/nomad-stop-timeout
Browse files Browse the repository at this point in the history
Support StopTimeout for Docker tasks
  • Loading branch information
chelseakomlo committed Dec 4, 2017
2 parents c4ba7e5 + 5846442 commit 619189e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ IMPROVEMENTS:
* driver/docker: Adds support for adding host device to container via
`--device` [GH-2938]
* driver/docker: Adds support for `ulimit` and `sysctl` options [GH-3568]
* driver/docker: Adds support for StopTimeout (set to the same value as
kill_timeout [GH-3601]
* driver/qemu: Support graceful shutdowns on unix platforms [GH-3411]
* template: Updated to consul template 0.19.4 [GH-3543]
* core/enterprise: Return 501 status code in Nomad Pro for Premium end points
Expand Down
11 changes: 6 additions & 5 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,12 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
}

config := &docker.Config{
Image: d.imageID,
Hostname: driverConfig.Hostname,
User: task.User,
Tty: driverConfig.TTY,
OpenStdin: driverConfig.Interactive,
Image: d.imageID,
Hostname: driverConfig.Hostname,
User: task.User,
Tty: driverConfig.TTY,
OpenStdin: driverConfig.Interactive,
StopTimeout: int(task.KillTimeout.Seconds()),
}

if driverConfig.WorkDir != "" {
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/fsouza/go-dockerclient/container.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/fsouza/go-dockerclient/network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,10 @@
"revisionTime": "2016-07-19T20:45:16Z"
},
{
"checksumSHA1": "Fo+DksVXnYQULqol7d07WDAtSMg=",
"checksumSHA1": "E+wmSQrc/BXzgITrbNAbUzljoiM=",
"path": "github.com/fsouza/go-dockerclient",
"revision": "f06d891e0d0f000caf614fa8c670985434ae2df2",
"revisionTime": "2017-11-14T14:45:54Z"
"revision": "5ffdfff51ec0eba739b1039e65ba3625ef25f7c0",
"revisionTime": "2017-11-23T03:37:03Z"
},
{
"comment": "v1.8.5-2-g6ec4abd",
Expand Down

0 comments on commit 619189e

Please sign in to comment.