From 10a940ca0d218dd4460614925b285c8d94a759a3 Mon Sep 17 00:00:00 2001 From: Juanjo Alvarez Date: Tue, 25 Jul 2017 18:54:38 +0200 Subject: [PATCH] Workaround to use an upstream fix the zombie problem The zombie processes problem is a currently open issue of opencontainers: https://github.com/opencontainers/runc/issues/1443 Currently there is a PR that I've tested to work with our use cases: https://github.com/opencontainers/runc/pull/1506 But Glide doesn't seem to be able to get a version from a PR; and if I add LittleLightLittleFire's to the dependencies (and change the imports in the Go files) glide then fails with some error related to the other parts of libopencontainers and the fork having the same dependencies. So, this (ugly but simple) workaround in the Makefile was created to use the upstream PR so the machine-learning department can continue slurping all the code in the world while the upstream PR is merged. --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fc9d8e6..f26a44f 100644 --- a/Makefile +++ b/Makefile @@ -117,9 +117,18 @@ test-coverage-internal: fi; \ done; -build: dependencies docker-build +build: dependencies zombies-fix docker-build $(DOCKER_RUN) -v $(GOPATH):/go $(DOCKER_BUILD_IMAGE) make build-internal +# Fix for https://github.com/opencontainers/runc/issues/1443; remove this kludge +# when PR #1506 has been merged into ~master +TMPGIT := $(shell mktemp -d) +zombies-fix: + git clone https://github.com/LittleLightLittleFire/runc.git $(TMPGIT)/repo; \ + cd $(TMPGIT)/repo && git rebase origin/1443-runc-reap-child-process; \ + rm -rf $(VENDOR_PATH)/github.com/opencontainers/runc/; \ + cp -a $(TMPGIT)/repo $(VENDOR_PATH)/github.com/opencontainers/runc + build-internal: mkdir -p $(BUILD_PATH); \ for cmd in $(COMMANDS); do \