gloo icon indicating copy to clipboard operation
gloo copied to clipboard

Race condition caused by same translator being used in `proxyReconciler` and `validating_admission_webhook`

Open saiskee opened this issue 2 years ago • 0 comments

Gloo Edge Version

1.12.x (latest stable)

Kubernetes Version

1.24.x

Describe the bug

Because plugins are now long living (after gloo v1.12.15), a single translator instance should not be shared amongst different goroutines in order to prevent a race condition where multiple loops are trying to write to the plugin's persisted state (e.g. caches).

The validationTranslator is used here and the same validator is used in the validation server as well as the proxyReconciler and the gwValidationSyncer.

Steps to reproduce the bug

Build gloo with -race and make multiple updates to a virtual service with jwt config simultaneously (using a bash script). This will cause a DATA RACE log in the gloo pod.

Expected Behavior

--

Additional Context

No response

saiskee avatar Sep 21 '22 13:09 saiskee