diff --git a/hack/vendor.sh b/hack/vendor.sh index 8732224bfc10570e4398805300cc020910618ae7..f6422ccac5c30acbe1c9aeff6655f9192de0e885 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -75,7 +75,7 @@ rm -rf src/github.com/docker/distribution mkdir -p src/github.com/docker/distribution mv tmp-digest src/github.com/docker/distribution/digest -clone git github.com/docker/libcontainer 4a72e540feb67091156b907c4700e580a99f5a9d +clone git github.com/docker/libcontainer fd0087d3acdc4c5865de1829d4accee5e3ebb658 # 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' | grep -v 'github.com/Sirupsen/logrus')" diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/apply_raw.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/apply_raw.go index f6c0d7d597823eb49e336a172b8e57283616219e..5cb8467c782cc71311d3fd99256660b484ec777e 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/apply_raw.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/apply_raw.go @@ -99,12 +99,11 @@ func (m *Manager) Apply(pid int) error { // created then join consists of writing the process pids to cgroup.procs p, err := d.path(name) if err != nil { + if cgroups.IsNotFound(err) { + continue + } return err } - if !cgroups.PathExists(p) { - continue - } - paths[name] = p } m.Paths = paths diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/blkio.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/blkio.go index 01da5d7fc7edee4265917f70d96a41988689c58c..8e132643bb92e02ca1fcc63a776c3da275047f7c 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/blkio.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/blkio.go @@ -17,12 +17,8 @@ type BlkioGroup struct { func (s *BlkioGroup) Apply(d *data) error { dir, err := d.join("blkio") - if err != nil { - if cgroups.IsNotFound(err) { - return nil - } else { - return err - } + if err != nil && !cgroups.IsNotFound(err) { + return err } if err := s.Set(dir, d.c); err != nil { diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/cpu.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/cpu.go index 42386fd847b4b71567f1398df03adf2e9e0965b7..1fbf7b1540902197348100a8da4d2bce15d651e8 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/cpu.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/cpu.go @@ -18,11 +18,7 @@ func (s *CpuGroup) Apply(d *data) error { // on a container basis dir, err := d.join("cpu") if err != nil { - if cgroups.IsNotFound(err) { - return nil - } else { - return err - } + return err } if err := s.Set(dir, d.c); err != nil { diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/devices.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/devices.go index fab8323e93db2b2ce91680e9e6ea03c662dddd10..16e00b1c73b2b064242ea5ef84e1ce90b065de1c 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/devices.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/devices.go @@ -11,11 +11,7 @@ type DevicesGroup struct { func (s *DevicesGroup) Apply(d *data) error { dir, err := d.join("devices") if err != nil { - if cgroups.IsNotFound(err) { - return nil - } else { - return err - } + return err } if err := s.Set(dir, d.c); err != nil { diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/freezer.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/freezer.go index 5e08e05302bed77cd3dd324946f0ccdcdc067a92..fc8241d1bfd13855005b99d2d0f491a5139fc339 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/freezer.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/freezer.go @@ -13,12 +13,8 @@ type FreezerGroup struct { func (s *FreezerGroup) Apply(d *data) error { dir, err := d.join("freezer") - if err != nil { - if cgroups.IsNotFound(err) { - return nil - } else { - return err - } + if err != nil && !cgroups.IsNotFound(err) { + return err } if err := s.Set(dir, d.c); err != nil { diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/fs/memory.go b/vendor/src/github.com/docker/libcontainer/cgroups/fs/memory.go index 68e930fdc506ad8042d96fa95f1cc5de6d2300cf..b99f81687a6a8e0016b70c163672b103337a39ae 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/fs/memory.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/fs/memory.go @@ -16,12 +16,9 @@ type MemoryGroup struct { func (s *MemoryGroup) Apply(d *data) error { dir, err := d.join("memory") - if err != nil { - if cgroups.IsNotFound(err) { - return nil - } else { - return err - } + // only return an error for memory if it was specified + if err != nil && (d.c.Memory != 0 || d.c.MemoryReservation != 0 || d.c.MemorySwap != 0) { + return err } defer func() { if err != nil { diff --git a/vendor/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go b/vendor/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go index f4358e1a64adf13d273911593c6d18224537af09..f353640697853a143f9ee6ed235c9e3bb8437854 100644 --- a/vendor/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go +++ b/vendor/src/github.com/docker/libcontainer/cgroups/systemd/apply_systemd.go @@ -91,7 +91,7 @@ func UseSystemd() bool { ddf := newProp("DefaultDependencies", false) if _, err := theConn.StartTransientUnit("docker-systemd-test-default-dependencies.scope", "replace", ddf); err != nil { if dbusError, ok := err.(dbus.Error); ok { - if dbusError.Name == "org.freedesktop.DBus.Error.PropertyReadOnly" { + if strings.Contains(dbusError.Name, "org.freedesktop.DBus.Error.PropertyReadOnly") { hasTransientDefaultDependencies = false } } diff --git a/vendor/src/github.com/docker/libcontainer/netlink/netlink_linux.go b/vendor/src/github.com/docker/libcontainer/netlink/netlink_linux.go index 3ecb81fb7867b7c74e9923747c16974c0ebaba70..c438ec300ff076ed36f85ebf69fa43792698aaff 100644 --- a/vendor/src/github.com/docker/libcontainer/netlink/netlink_linux.go +++ b/vendor/src/github.com/docker/libcontainer/netlink/netlink_linux.go @@ -659,7 +659,7 @@ func networkSetNsAction(iface *net.Interface, rtattr *RtAttr) error { } // Move a particular network interface to a particular network namespace -// specified by PID. This is idential to running: ip link set dev $name netns $pid +// specified by PID. This is identical to running: ip link set dev $name netns $pid func NetworkSetNsPid(iface *net.Interface, nspid int) error { data := uint32Attr(syscall.IFLA_NET_NS_PID, uint32(nspid)) return networkSetNsAction(iface, data) @@ -673,7 +673,7 @@ func NetworkSetNsFd(iface *net.Interface, fd int) error { return networkSetNsAction(iface, data) } -// Rname a particular interface to a different name +// Rename a particular interface to a different name // !!! Note that you can't rename an active interface. You need to bring it down before renaming it. // This is identical to running: ip link set dev ${oldName} name ${newName} func NetworkChangeName(iface *net.Interface, newName string) error {