Update libcontainer to 84c1636580a356db88b079d118b

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f42176434aa874afb7d633064f2babcf9d5124ab
Component: engine
This commit is contained in:
Michael Crosby
2014-11-20 14:19:24 -08:00
parent e22789790c
commit 2a4e189795
4 changed files with 15 additions and 22 deletions

View File

@ -66,7 +66,7 @@ if [ "$1" = '--go' ]; then
mv tmp-tar src/code.google.com/p/go/src/pkg/archive/tar
fi
clone git github.com/docker/libcontainer 28cb5f9dfd6f3352c610a4f1502b5df4f69389ea
clone git github.com/docker/libcontainer 84c1636580a356db88b079d118b94abe6a1a0acd
# see src/github.com/docker/libcontainer/update-vendor.sh which is the "source of truth" for libcontainer deps (just like this file)
rm -rf src/github.com/docker/libcontainer/vendor
eval "$(grep '^clone ' src/github.com/docker/libcontainer/update-vendor.sh | grep -v 'github.com/codegangsta/cli')"

View File

@ -14,17 +14,11 @@ type CpusetGroup struct {
}
func (s *CpusetGroup) Set(d *data) error {
// we don't want to join this cgroup unless it is specified
if d.c.CpusetCpus != "" {
dir, err := d.path("cpuset")
if err != nil {
return err
}
return s.SetDir(dir, d.c.CpusetCpus, d.pid)
dir, err := d.path("cpuset")
if err != nil {
return err
}
return nil
return s.SetDir(dir, d.c.CpusetCpus, d.pid)
}
func (s *CpusetGroup) Remove(d *data) error {
@ -46,8 +40,12 @@ func (s *CpusetGroup) SetDir(dir, value string, pid int) error {
return err
}
if err := writeFile(dir, "cpuset.cpus", value); err != nil {
return err
// If we don't use --cpuset, the default cpuset.cpus is set in
// s.ensureParent, otherwise, use the value we set
if value != "" {
if err := writeFile(dir, "cpuset.cpus", value); err != nil {
return err
}
}
return nil

View File

@ -137,16 +137,14 @@ func Apply(c *cgroups.Cgroup, pid int) (map[string]string, error) {
}
// we need to manually join the freezer cgroup in systemd because it does not currently support it
// via the dbus api
// we need to manually join the freezer and cpuset cgroup in systemd
// because it does not currently support it via the dbus api.
if err := joinFreezer(c, pid); err != nil {
return nil, err
}
if c.CpusetCpus != "" {
if err := joinCpuset(c, pid); err != nil {
return nil, err
}
if err := joinCpuset(c, pid); err != nil {
return nil, err
}
paths := make(map[string]string)

View File

@ -39,9 +39,6 @@ func (v *Veth) Create(n *Network, nspid int, networkState *NetworkState) error {
if err := SetMtu(name1, n.Mtu); err != nil {
return err
}
if err := SetHairpinMode(name1, true); err != nil {
return err
}
if err := InterfaceUp(name1); err != nil {
return err
}