Change:
obj.Items = append(obj.Items, nodes.Items...) return true, obj, nil }) <ins> var mu sync.Mutex </ins> volumeAttachments = &storagev1.VolumeAttachmentList{} fakeClient.AddReactor("list", "volumeattachments", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &storagev1.VolumeAttachmentList{} <ins> mu.Lock() </ins> obj.Items = append(obj.Items, volumeAttachments.Items...) <ins> mu.Unlock() </ins> return true, obj, nil }) fakeClient.AddReactor("create", "volumeattachments", func(action core.Action) (handled bool, ret runtime.Object, err error) { createAction := action.(core.CreateAction) va := createAction.GetObject().(*storagev1.VolumeAttachment) <ins> mu.Lock() </ins> volumeAttachments.Items = append(volumeAttachments.Items, *va) <ins> mu.Unlock() </ins> return true, createAction.GetObject(), nil }) pvs = &v1.PersistentVolumeList{} fakeClient.AddReactor("list", "persistentvolumes", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &v1.PersistentVolumeList{} <ins> mu.Lock() </ins> obj.Items = append(obj.Items, pvs.Items...) <ins> mu.Unlock() </ins> return true, obj, nil }) fakeClient.AddReactor("create", "persistentvolumes", func(action core.Action) (handled bool, ret runtime.Object, err error) { createAction := action.(core.CreateAction) pv := createAction.GetObject().(*v1.PersistentVolume) <ins> mu.Lock() </ins> pvs.Items = append(pvs.Items, *pv) <ins> mu.Unlock() </ins> return true, createAction.GetObject(), nil })

Discussion:
<!-- Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI --
/sig storage /triage accepted
Pr continue failed beacuse this data race, and i did an fix in ,it's ok now.
/assign
another instance
another instance: (PR: )
flaked again since was merged
fixed in
/reopen Can you backport to 1.21?
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
opened
Hit this bug also while working on a fix for 1.19 - so maybe we should open another issue/pr for 1.20 and 1.19 ? At least 1.19 will be still around for quite a while
I think that would probably be approved. if anyone wants to take a stab at it
Thanks I'll check over weekend if i can provide this fix also to 1.20 and 1.19
Opened for 1.19 Opened for 1.20
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Mark this issue or PR as rotten with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at .

/lifecycle rotten [1]:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Reopen this issue or PR with Mark this issue or PR as fresh with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /close [1]:
Closing this issue. <detailsIn response to : The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closedReopen this issue or PR with Mark this issue or PR as fresh with Offer to help out with [Issue Triage][1] Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details