Better startup error handling and configurability

Short circuit kubelet initialization if the root volume directory can't be
created, as volume mounts are non-functional in the absence of the directory.
Without this check, volume mounts (including Docker socket mounts for builds)
fail in non-obvious ways.

Make the etcd and volume directories configurable to better facilitate dev
and test environments. Retain the existing defaults for turnkey prod-like
operation.


> On Sep 19, 2014, at 11:50 AM, Dan Mace <notifications@github.com> wrote:
> 
> In pkg/cmd/master/master.go:
> 
> > @@ -252,7 +256,10 @@ func (c *config) runKubelet() {
> >  	etcdClient, _ := c.getEtcdClient()
> >  
> >  	// initialize Kubelet
> > -	os.MkdirAll(rootDirectory, 0750)
> > +	if err := os.MkdirAll(rootDirectory, 0750); err != nil {
> Good catch; how about this: only try to create if it doesn't already exist?
> 
> 
> 
How about this - use it if it exists, otherwise use a local directory path relative to the current dir.  I don't want to require root yet.=