Commit 8f918d36 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #33809 from Random-Liu/fix-mount-issue-in-dockershim

Automatic merge from submit-queue CRI: Fix mount issue in dockershim. For https://github.com/kubernetes/kubernetes/issues/33189. The test `Container Runtime Conformance Test container runtime conformance blackbox test when starting a container that exits should report termination message if TerminationMessagePath is set` flakes a lot. (see https://k8s-testgrid.appspot.com/google-node#kubelet-cri-gce-e2e&width=5) After some investigation, I found the problem is that we are using pointer of iterator. This fixes the flake. @yujuhong @feiskyer
parents 6d770c32 ab502f32
...@@ -227,7 +227,8 @@ func (ds *dockerService) ContainerStatus(containerID string) (*runtimeApi.Contai ...@@ -227,7 +227,8 @@ func (ds *dockerService) ContainerStatus(containerID string) (*runtimeApi.Contai
// Convert the mounts. // Convert the mounts.
mounts := []*runtimeApi.Mount{} mounts := []*runtimeApi.Mount{}
for _, m := range r.Mounts { for i := range r.Mounts {
m := r.Mounts[i]
readonly := !m.RW readonly := !m.RW
mounts = append(mounts, &runtimeApi.Mount{ mounts = append(mounts, &runtimeApi.Mount{
Name: &m.Name, Name: &m.Name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment