ws-manager: fix event workers hang forever #12995
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix workers hang if there are over 100 VolumeSnapshot is ready, and we restart the ws-manager.
The
m.notifyPod
channel is no receiver, and it causes the 100 event workers to hang forever.So, the ws-manager can't handle any workspace pod event and volume snapshot event changes.
Description
Fix event workers hang if there are 100+ VolumeSnapshot ready and ws-manager restarts.
Related Issue(s)
Fixes #13007
How to test
Prepare Pod yaml manifest and save it as
pod.yaml
.Prepare PVC yaml manifest and save it as
pvc.yaml
.Prepare VolumeSnapshot yaml manifest and save it as
vs-0.yaml
.Prepare 100 VolumeSnapshot yaml manifest.
for i in {1..100}; do cp vs-0.yaml vs-${i}.yaml; sed -i "s/-0/-${i}/g" vs-${i}.yaml; done
Prepare Pod and PVC.
kubectl create -f pod.yaml -f pvc.yaml
Wait the Pod is running and PVC is bound.
Prepare 100 VolumeSnapshots.
for i in {1..100}; do kubectl apply -f vs-${i}.yaml; done
Waits for all the 100 VolumeSnapshots become ready.
kubectl get vs | grep true | wc -l
Restart ws-manager
kubectl rollout restart deploy ws-manager
Make sure the workspace can start.
Release Notes
Documentation
None
Werft options: