From d60a3418d0268745dff38947bc8c929fbd24f837 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 20 Oct 2016 15:42:50 -0700 Subject: [PATCH] Bump runc to f59ba3cdd76fdc08c004f42aa915996f6f420899 Signed-off-by: Michael Crosby --- Dockerfile | 4 ++-- Dockerfile.aarch64 | 4 ++-- Dockerfile.armhf | 4 ++-- Dockerfile.gccgo | 4 ++-- Dockerfile.ppc64le | 4 ++-- Dockerfile.s390x | 4 ++-- Dockerfile.simple | 4 ++-- hack/make/build-deb | 2 +- hack/make/build-rpm | 2 +- hack/vendor.sh | 2 +- .../runc/libcontainer/system/proc.go | 20 +++++++++++++++++-- 11 files changed, 35 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a18995177..49e2bc3a0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -242,10 +242,10 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 06211903f7..e0baa89c34 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -181,10 +181,10 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d1bb2771d9..ebbf3c0c6d 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -190,10 +190,10 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/Dockerfile.gccgo b/Dockerfile.gccgo index fe2cef519e..be7df73e31 100644 --- a/Dockerfile.gccgo +++ b/Dockerfile.gccgo @@ -74,10 +74,10 @@ WORKDIR /go/src/github.com/docker/docker ENV DOCKER_BUILDTAGS apparmor seccomp selinux # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index ae473d995c..366f9a1f12 100644 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -202,10 +202,10 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="apparmor seccomp selinux" \ diff --git a/Dockerfile.s390x b/Dockerfile.s390x index d5e1dde042..445f0f52fa 100644 --- a/Dockerfile.s390x +++ b/Dockerfile.s390x @@ -197,10 +197,10 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/Dockerfile.simple b/Dockerfile.simple index dc244ef3ca..91453b9567 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -57,10 +57,10 @@ ENV GOPATH /go:/go/src/github.com/docker/docker/vendor ENV CGO_LDFLAGS -L/lib # Install runc -ENV RUNC_COMMIT 02f8fa7863dd3f82909a73e2061897828460d52f +ENV RUNC_COMMIT f59ba3cdd76fdc08c004f42aa915996f6f420899 RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ + && git clone https://github.com/docker/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ && cd "$GOPATH/src/github.com/opencontainers/runc" \ && git checkout -q "$RUNC_COMMIT" \ && make static BUILDTAGS="seccomp apparmor selinux" \ diff --git a/hack/make/build-deb b/hack/make/build-deb index e2a4e921b6..5eedb299ae 100644 --- a/hack/make/build-deb +++ b/hack/make/build-deb @@ -72,7 +72,7 @@ set -e # add runc and containerd compile and install cat >> "$DEST/$version/Dockerfile.build" <<-EOF # Install runc - RUN git clone https://github.com/opencontainers/runc.git "/go/src/github.com/opencontainers/runc" \ + RUN git clone https://github.com/docker/runc.git "/go/src/github.com/opencontainers/runc" \ && cd "/go/src/github.com/opencontainers/runc" \ && git checkout -q "\$RUNC_COMMIT" RUN set -x && export GOPATH="/go" && cd "/go/src/github.com/opencontainers/runc" \ diff --git a/hack/make/build-rpm b/hack/make/build-rpm index 195570b81a..18ff488587 100644 --- a/hack/make/build-rpm +++ b/hack/make/build-rpm @@ -99,7 +99,7 @@ set -e # add runc and containerd compile and install cat >> "$DEST/$version/Dockerfile.build" <<-EOF # Install runc - RUN git clone https://github.com/opencontainers/runc.git "/go/src/github.com/opencontainers/runc" \ + RUN git clone https://github.com/docker/runc.git "/go/src/github.com/opencontainers/runc" \ && cd "/go/src/github.com/opencontainers/runc" \ && git checkout -q "\$RUNC_COMMIT" RUN set -x && export GOPATH="/go" && cd "/go/src/github.com/opencontainers/runc" \ diff --git a/hack/vendor.sh b/hack/vendor.sh index 5be6ca19d9..0beb4d044d 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -102,7 +102,7 @@ clone git github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f clone git github.com/docker/go v1.5.1-1-1-gbaf439e clone git github.com/agl/ed25519 d2b94fd789ea21d12fac1a4443dd3a3f79cda72c -clone git github.com/opencontainers/runc 02f8fa7863dd3f82909a73e2061897828460d52f # libcontainer +clone git github.com/opencontainers/runc f59ba3cdd76fdc08c004f42aa915996f6f420899 https://github.com/docker/runc.git # libcontainer clone git github.com/opencontainers/specs 1c7c27d043c2a5e513a44084d2b10d77d1402b8c # specs clone git github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0 # libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json) diff --git a/vendor/src/github.com/opencontainers/runc/libcontainer/system/proc.go b/vendor/src/github.com/opencontainers/runc/libcontainer/system/proc.go index 37808a29f6..a0e9637199 100644 --- a/vendor/src/github.com/opencontainers/runc/libcontainer/system/proc.go +++ b/vendor/src/github.com/opencontainers/runc/libcontainer/system/proc.go @@ -14,8 +14,10 @@ func GetProcessStartTime(pid int) (string, error) { if err != nil { return "", err } + return parseStartTime(string(data)) +} - parts := strings.Split(string(data), " ") +func parseStartTime(stat string) (string, error) { // the starttime is located at pos 22 // from the man page // @@ -23,5 +25,19 @@ func GetProcessStartTime(pid int) (string, error) { // (22) The time the process started after system boot. In kernels before Linux 2.6, this // value was expressed in jiffies. Since Linux 2.6, the value is expressed in clock ticks // (divide by sysconf(_SC_CLK_TCK)). - return parts[22-1], nil // starts at 1 + // + // NOTE: + // pos 2 could contain space and is inside `(` and `)`: + // (2) comm %s + // The filename of the executable, in parentheses. + // This is visible whether or not the executable is + // swapped out. + // + // the following is an example: + // 89653 (gunicorn: maste) S 89630 89653 89653 0 -1 4194560 29689 28896 0 3 146 32 76 19 20 0 1 0 2971844 52965376 3920 18446744073709551615 1 1 0 0 0 0 0 16781312 137447943 0 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + + // get parts after last `)`: + s := strings.Split(stat, ")") + parts := strings.Split(strings.TrimSpace(s[len(s)-1]), " ") + return parts[22-3], nil // starts at 3 (after the filename pos `2`) }