From ab502f32a7f9f2ef1e6592b783ba9955c61154f9 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Thu, 29 Sep 2016 20:13:39 -0700 Subject: [PATCH] Fix mount issue in dockershim. --- pkg/kubelet/dockershim/docker_container.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/dockershim/docker_container.go b/pkg/kubelet/dockershim/docker_container.go index c479b880f11..e4e29a5209a 100644 --- a/pkg/kubelet/dockershim/docker_container.go +++ b/pkg/kubelet/dockershim/docker_container.go @@ -227,7 +227,8 @@ func (ds *dockerService) ContainerStatus(containerID string) (*runtimeApi.Contai // Convert the mounts. mounts := []*runtimeApi.Mount{} - for _, m := range r.Mounts { + for i := range r.Mounts { + m := r.Mounts[i] readonly := !m.RW mounts = append(mounts, &runtimeApi.Mount{ Name: &m.Name,