Update libcontainer to fd0087d3acdc4c5865de1829d4a

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-03-23 11:49:02 -07:00
parent 65e21f5703
commit e321ec9807
9 changed files with 16 additions and 36 deletions

View file

@ -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')"

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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
}
}

View file

@ -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 {