Add support for "run in"

To support "exec" health checking, debugging and kubelet lifecycle events
Yes, I was in the right dir.  It *does* work if I run it under 'strace'
which is the confusing part.  It never works if I run without strace.  I
did not build nsinit - I just used whatever is there from a k8s push as of
a few days ago.  I'm willing to buy that this may be the problem, but it
would be nice if we were a bit more compatible with ourselves :)


On Mon, Aug 11, 2014 at 9:04 AM, Victor Marmol <notifications@github.com>
wrote:

> In pkg/kubelet/docker.go:
>
> > @@ -63,6 +64,30 @@ func NewDockerPuller(client DockerInterface) DockerPuller {
> >  	}
> >  }
> >
> > +type dockerContainerCommandRunner struct{}
> > +
> > +func (d *dockerContainerCommandRunner) getRunInContainerCommand(containerID string, cmd []string) (*exec.Cmd, error) {
> > +	args := append([]string{"exec"}, cmd...)
> > +	command := exec.Command("/usr/sbin/nsinit", args...)
> > +	command.Dir = fmt.Sprintf("/var/lib/docker/execdriver/native/%s", containerID)
>
> @thockin <https://github.com/thockin> the two things that come to mind
> are whether you're in the right working directory and if you have the
> version of nsinit that is built at the same time as Docker. Note that this
> was fixed recently:
>
> docker/libcontainer#57 <https://github.com/docker/libcontainer/issues/57>
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/825/files#r16062101>
> .
>