Add container hashing to the container name, and restart containers on changes.

Closes https://github.com/GoogleCloudPlatform/kubernetes/issues/677
OK, that's good enough.


On Thu, Aug 7, 2014 at 8:54 PM, brendandburns <notifications@github.com>
wrote:

> In pkg/kubelet/docker.go:
>
> > @@ -173,15 +176,22 @@ func unescapeDash(in string) (out string) {
> >
> >  const containerNamePrefix = "k8s"
> >
> > +func hashContainer(container *api.Container) uint64 {
> > +	hash := adler32.New()
> > +	fmt.Fprintf(hash, "%#v", *container)
> > +	return uint64(hash.Sum32())
>
> All of the parsing/formatting instructions expect a uint64, so the choices
> are convert here in one place, or cast in multiple places. @lavalamp
> <https://github.com/lavalamp> requested that I do it here. I don't care
> too much either way.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/827/files#r15977251>
> .
>