Fix process group handling. (#271)
Also add a makefile target to build the debug image.
This commit is contained in:
parent
63ef549b2c
commit
8a2492d241
1
Makefile
1
Makefile
|
|
@ -51,3 +51,4 @@ integration-test:
|
|||
.PHONY: images
|
||||
images:
|
||||
docker build -t $(REGISTRY)/executor:latest -f deploy/Dockerfile .
|
||||
docker build -t $(REGISTRY)/executor:debug -f deploy/Dockerfile_debug .
|
||||
|
|
|
|||
|
|
@ -35,4 +35,4 @@ fi
|
|||
echo "Running integration tests..."
|
||||
make out/executor
|
||||
pushd integration
|
||||
go test -v --bucket "${GCS_BUCKET}" --repo "${IMAGE_REPO}"
|
||||
go test -v --bucket "${GCS_BUCKET}" --repo "${IMAGE_REPO}" --timeout 30m
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ func (r *RunCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.Bui
|
|||
}
|
||||
gid = uint32(gid64)
|
||||
}
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
cmd.SysProcAttr.Credential = &syscall.Credential{Uid: uid, Gid: gid}
|
||||
}
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
|
||||
if err := cmd.Start(); err != nil {
|
||||
return errors.Wrap(err, "starting command")
|
||||
|
|
@ -101,7 +101,6 @@ func (r *RunCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.Bui
|
|||
if err != nil {
|
||||
return errors.Wrap(err, "getting group id for process")
|
||||
}
|
||||
|
||||
if err := cmd.Wait(); err != nil {
|
||||
return errors.Wrap(err, "waiting for process to exit")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue