mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Setting the cg path after application of pid
This commit is contained in:
4
Godeps/Godeps.json
generated
4
Godeps/Godeps.json
generated
@@ -7,6 +7,10 @@
|
||||
"ImportPath": "github.com/StackExchange/wmi",
|
||||
"Rev": "f3e2bae1e0cb5aef83e319133eabfee30013a4a5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Sirupsen/logrus",
|
||||
"Rev": "4b6ea7319e214d98c938f12692336f7ca9348d6b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/armon/circbuf",
|
||||
"Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
|
||||
|
||||
@@ -375,8 +375,7 @@ func (e *UniversalExecutor) Exit() error {
|
||||
}
|
||||
if e.command != nil && e.command.ResourceLimits {
|
||||
e.cgLock.Lock()
|
||||
err := DestroyCgroup(e.groups, e.cgPaths)
|
||||
if err != nil {
|
||||
if err := DestroyCgroup(e.groups, e.cgPaths); err != nil {
|
||||
merr.Errors = append(merr.Errors, err)
|
||||
}
|
||||
e.cgLock.Unlock()
|
||||
|
||||
@@ -65,12 +65,15 @@ func (e *UniversalExecutor) applyLimits(pid int) error {
|
||||
return err
|
||||
}
|
||||
e.cgPaths = manager.GetPaths()
|
||||
cgConfig := cgroupConfig.Config{Cgroup: e.groups}
|
||||
cgConfig := cgroupConfig.Config{Cgroups: e.groups}
|
||||
if err := manager.Set(&cgConfig); err != nil {
|
||||
e.logger.Printf("[ERR] executor: error setting cgroup config: %v", err)
|
||||
if er := DestroyCgroup(e.groups, e.cgPaths); er != nil {
|
||||
e.logger.Printf("[ERR] executor: error destroying cgroup: %v", er)
|
||||
}
|
||||
if er := e.removeChrootMounts(); er != nil {
|
||||
e.logger.Printf("[ERR] executor: error removing chroot: %v", er)
|
||||
}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user