Update containerd dependencies
sys/unix cgroups go-runc console Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
3
vendor/github.com/containerd/cgroups/cgroup.go
generated
vendored
3
vendor/github.com/containerd/cgroups/cgroup.go
generated
vendored
@@ -245,6 +245,9 @@ func (c *cgroup) processes(subsystem Name, recursive bool) ([]Process, error) {
|
||||
return err
|
||||
}
|
||||
if !recursive && info.IsDir() {
|
||||
if p == path {
|
||||
return nil
|
||||
}
|
||||
return filepath.SkipDir
|
||||
}
|
||||
dir, name := filepath.Split(p)
|
||||
|
||||
9
vendor/github.com/containerd/cgroups/cpuset.go
generated
vendored
9
vendor/github.com/containerd/cgroups/cpuset.go
generated
vendored
@@ -84,15 +84,14 @@ func (c *cpusetController) ensureParent(current, root string) error {
|
||||
if _, err := filepath.Rel(root, parent); err != nil {
|
||||
return nil
|
||||
}
|
||||
if cleanPath(parent) == root {
|
||||
return nil
|
||||
}
|
||||
// Avoid infinite recursion.
|
||||
if parent == current {
|
||||
return fmt.Errorf("cpuset: cgroup parent path outside cgroup root")
|
||||
}
|
||||
if err := c.ensureParent(parent, root); err != nil {
|
||||
return err
|
||||
if cleanPath(parent) != root {
|
||||
if err := c.ensureParent(parent, root); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := os.MkdirAll(current, defaultDirPerm); err != nil {
|
||||
return err
|
||||
|
||||
5
vendor/github.com/containerd/cgroups/ticks.go
generated
vendored
5
vendor/github.com/containerd/cgroups/ticks.go
generated
vendored
@@ -1,5 +1,10 @@
|
||||
package cgroups
|
||||
|
||||
func getClockTicks() uint64 {
|
||||
// The value comes from `C.sysconf(C._SC_CLK_TCK)`, and
|
||||
// on Linux it's a constant which is safe to be hard coded,
|
||||
// so we can avoid using cgo here.
|
||||
// See https://github.com/containerd/cgroups/pull/12 for
|
||||
// more details.
|
||||
return 100
|
||||
}
|
||||
|
||||
4
vendor/github.com/containerd/cgroups/utils.go
generated
vendored
4
vendor/github.com/containerd/cgroups/utils.go
generated
vendored
@@ -207,7 +207,9 @@ func parseCgroupFromReader(r io.Reader) (map[string]string, error) {
|
||||
return nil, fmt.Errorf("invalid cgroup entry: must contain at least two colons: %v", text)
|
||||
}
|
||||
for _, subs := range strings.Split(parts[1], ",") {
|
||||
cgroups[subs] = parts[2]
|
||||
if subs != "" {
|
||||
cgroups[subs] = parts[2]
|
||||
}
|
||||
}
|
||||
}
|
||||
return cgroups, nil
|
||||
|
||||
Reference in New Issue
Block a user