Update libcontainer to be02944484da197166020d6b3f0

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-01-08 10:29:24 -08:00
parent 11e47996dc
commit 16dbd84f63
5 changed files with 7 additions and 10 deletions

View File

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

View File

@ -1,6 +1,5 @@
FROM crosbymichael/golang FROM golang:1.4
RUN apt-get update && apt-get install -y gcc make
RUN go get golang.org/x/tools/cmd/cover RUN go get golang.org/x/tools/cmd/cover
ENV GOPATH $GOPATH:/go/src/github.com/docker/libcontainer/vendor ENV GOPATH $GOPATH:/go/src/github.com/docker/libcontainer/vendor

View File

@ -53,7 +53,7 @@ func expectBlkioStatsEquals(t *testing.T, expected, actual cgroups.BlkioStats) {
} }
if err := blkioStatEntryEquals(expected.IoMergedRecursive, actual.IoMergedRecursive); err != nil { if err := blkioStatEntryEquals(expected.IoMergedRecursive, actual.IoMergedRecursive); err != nil {
log.Printf("blkio IoMergedRecursive do not match - %s vs %s\n", expected.IoMergedRecursive, actual.IoMergedRecursive) log.Printf("blkio IoMergedRecursive do not match - %v vs %v\n", expected.IoMergedRecursive, actual.IoMergedRecursive)
t.Fail() t.Fail()
} }

View File

@ -32,13 +32,13 @@ func newTemplateConfig(rootfs string) *libcontainer.Config {
"KILL", "KILL",
"AUDIT_WRITE", "AUDIT_WRITE",
}, },
Namespaces: libcontainer.Namespaces{ Namespaces: libcontainer.Namespaces([]libcontainer.Namespace{
{Type: libcontainer.NEWNS}, {Type: libcontainer.NEWNS},
{Type: libcontainer.NEWUTS}, {Type: libcontainer.NEWUTS},
{Type: libcontainer.NEWIPC}, {Type: libcontainer.NEWIPC},
{Type: libcontainer.NEWPID}, {Type: libcontainer.NEWPID},
{Type: libcontainer.NEWNET}, {Type: libcontainer.NEWNET},
}, }),
Cgroups: &cgroups.Cgroup{ Cgroups: &cgroups.Cgroup{
Parent: "integration", Parent: "integration",
AllowAllDevices: false, AllowAllDevices: false,

View File

@ -15,10 +15,6 @@
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#ifndef PR_SET_CHILD_SUBREAPER
#define PR_SET_CHILD_SUBREAPER 36
#endif
static const kBufSize = 256; static const kBufSize = 256;
static const char *kNsEnter = "nsenter"; static const char *kNsEnter = "nsenter";
@ -93,11 +89,13 @@ void nsenter()
return; return;
} }
#ifdef PR_SET_CHILD_SUBREAPER
if (prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0) == -1) { if (prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0) == -1) {
fprintf(stderr, "nsenter: failed to set child subreaper: %s", fprintf(stderr, "nsenter: failed to set child subreaper: %s",
strerror(errno)); strerror(errno));
exit(1); exit(1);
} }
#endif
static const struct option longopts[] = { static const struct option longopts[] = {
{"nspid", required_argument, NULL, 'n'}, {"nspid", required_argument, NULL, 'n'},