Kubelet directory-name builder funcs

This is shake-out from playing with volumes.  Not sure if the rollback stuff is right - we do not clean up other stuff if a pod fails to start...

@dchen1107 
Simplified and not changing paths - one step at a time.

PTAL

On Sat, Dec 6, 2014 at 10:04 AM, Daniel Smith <notifications@github.com>
wrote:
>
> In pkg/kubelet/kubelet.go:
>
> > @@ -633,6 +693,14 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke
> >  	containersToKeep := make(map[dockertools.DockerID]empty)
> >  	killedContainers := make(map[dockertools.DockerID]empty)
> >
> > +	p := kl.GetPodDir(pod.UID)
> > +	if err := os.MkdirAll(p, 0750); err != nil {
> > +		glog.Errorf("Error creating %s: %v", p, err)
> > +	}
> > +	// FIXME: having a hard time convincing myself this is right.  It feels right, but is it always?
>
> +1 to breaking up.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/2667/files#r21418034>
> .
>