Skip to content

Commit

Permalink
driver/docker: ignore cpuset errors for short-lived tasks follow up (#…
Browse files Browse the repository at this point in the history
…10730)

minor refactor and changelog
  • Loading branch information
Mahmood Ali authored Jun 9, 2021
1 parent 0849b03 commit 322617d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BUG FIXES:
* csi: Fixed a bug where `capability` blocks were not passed to CSI controller plugins for validation for `nomad volume register` commands. [[GH-10703](https://github.com/hashicorp/nomad/issues/10703)]
* client: Fixed a bug where `alloc exec` sessions may terminate abruptly after a few minutes [[GH-10710](https://github.com/hashicorp/nomad/issues/10710)]
* drivers/exec: Fixed a bug where `exec` and `java` tasks inherit the Nomad agent's `oom_score_adj` value [[GH-10698](https://github.com/hashicorp/nomad/issues/10698)]
* drivers/docker: Fixed a bug where short lived docker tasks may fail with obscure cpuset cgroup errors [[GH-10416](https://github.com/hashicorp/nomad/issues/10416)]
* quotas (Enterprise): Fixed a bug where stopped allocations for a failed deployment can be double-credited to quota limits, resulting in a quota limit bypass. [[GH-10694](https://github.com/hashicorp/nomad/issues/10694)]
* ui: Fixed a bug where exec would not work across regions. [[GH-10539](https://github.com/hashicorp/nomad/issues/10539)]
* ui: Fixed global-search shortcut for non-english keyboards. [[GH-10714](https://github.com/hashicorp/nomad/issues/10714)]
Expand Down
10 changes: 4 additions & 6 deletions drivers/docker/driver_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import (
func setCPUSetCgroup(path string, pid int) error {
// Sometimes the container exists before we can write the
// cgroup resulting in an error which can be ignored.
if err := cgroups.WriteCgroupProc(path, pid); err != nil {
if strings.Contains(err.Error(), "no such process") {
return nil
}
return err
err := cgroups.WriteCgroupProc(path, pid)
if err != nil && strings.Contains(err.Error(), "no such process") {
return nil
}
return nil
return err
}

0 comments on commit 322617d

Please sign in to comment.