Summary
Browser pods can remain stuck in 1/2 NotReady indefinitely after seleniferous exits, while the corresponding Browser CRD stays in Failed. This persists well beyond SESSION_IDLE_TIMEOUT. Cleanup requires manual intervention.
Observed when running many parallel browser sessions and under cluster resource pressure (CPU/memory/scheduling; many Pending or slow-starting pods). The product issue is lack of guaranteed cleanup when Browser is terminal Failed and selenosis does not delete the CRD.
Environment
| Component |
Version |
| selenosis |
alcounit/selenosis:v2.0.7 |
| browser-controller |
alcounit/browser-controller:v0.0.6 |
| browser-service |
alcounit/browser-service:v0.0.6 |
| browser-ui |
alcounit/browser-ui:v0.0.7 |
| seleniferous (sidecar) |
alcounit/seleniferous:v2.0.6 |
Steps to reproduce
- Run automated tests that create many browser sessions in parallel (enough to stress CPU/memory or scheduling in the namespace).
- Optionally observe scheduling pressure:
kubectl get pods -n <namespace> shows multiple Pending or slow-starting browser pods.
- Wait for tests to finish.
- Check pods:
kubectl get pods -n <namespace>
- Check CRDs:
kubectl get browsers -n <namespace>
Expected behavior
After SESSION_IDLE_TIMEOUT (or after a definitive failure path), selenosis should remove the Browser CRD. browser-controller should complete finalizer handling and the pod should terminate.
Actual behavior
Pods remain 1/2 NotReady. Browser CRDs remain Failed and are not removed by selenosis (stayed more than 3 days in our cluster).
Example:
kubectl get browsers -n selenosis
NAME BROWSER VERSION PHASE AGE
eee39701-45c9-4427-a7bd-ace1f6502377 chrome 145.0-csp Failed 33m
f31c9a1a-0933-4607-9bff-448326efb3ca chrome 145.0-csp Failed 33m
kubectl get pods -n selenosis
eee39701-45c9-4427-a7bd-ace1f6502377 1/2 NotReady 0 33m
f31c9a1a-0933-4607-9bff-448326efb3ca 1/2 NotReady 0 33m
Logs
browser-controller
browser-controller — marks Failed, sees seleniferous not ready, then stops further reconciliation (waits for selenosis to delete the CRD):
{"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"message":"Browser status set to Failed"}
{"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"containerName":"seleniferous","containerReady":"false","restartCount":0,"message":"Browser Pod container statuses"}
{"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"finalizers":["browserpod.selenosis.io/finalizer"],"message":"current finalizers on Browser"}
{"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"message":"Browser is in Failed state, nothing to do"}
Suspected root cause
- Under resource pressure, parallel runs produce partial failures: e.g. seleniferous exits or never becomes ready while the browser container may still run → pod 1/2, Browser Failed.
- selenosis may not complete normal session lifecycle / idle-timeout cleanup for these objects (e.g. session never fully registered or state lost under load).
- browser-controller sets Failed and then "nothing to do", expecting selenosis to delete the Browser CRD.
- Deadlock: selenosis does not delete the CRD → finalizer / pod cleanup does not finish → pods linger NotReady.
Workaround
kubectl delete browsers -n selenosis --all
Summary
Browser pods can remain stuck in
1/2 NotReadyindefinitely afterseleniferousexits, while the correspondingBrowserCRD stays inFailed. This persists well beyondSESSION_IDLE_TIMEOUT. Cleanup requires manual intervention.Observed when running many parallel browser sessions and under cluster resource pressure (CPU/memory/scheduling; many
Pendingor slow-starting pods). The product issue is lack of guaranteed cleanup whenBrowseris terminalFailedand selenosis does not delete the CRD.Environment
alcounit/selenosis:v2.0.7alcounit/browser-controller:v0.0.6alcounit/browser-service:v0.0.6alcounit/browser-ui:v0.0.7alcounit/seleniferous:v2.0.6Steps to reproduce
kubectl get pods -n <namespace>shows multiplePendingor slow-starting browser pods.kubectl get pods -n <namespace>kubectl get browsers -n <namespace>Expected behavior
After
SESSION_IDLE_TIMEOUT(or after a definitive failure path), selenosis should remove theBrowserCRD. browser-controller should complete finalizer handling and the pod should terminate.Actual behavior
Pods remain
1/2 NotReady.BrowserCRDs remainFailedand are not removed by selenosis (stayed more than 3 days in our cluster).Example:
Logs
browser-controller
browser-controller — marks Failed, sees seleniferous not ready, then stops further reconciliation (waits for selenosis to delete the CRD):
{"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"message":"Browser status set to Failed"} {"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"containerName":"seleniferous","containerReady":"false","restartCount":0,"message":"Browser Pod container statuses"} {"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"finalizers":["browserpod.selenosis.io/finalizer"],"message":"current finalizers on Browser"} {"level":"info","Browser":{"name":"eee39701-45c9-4427-a7bd-ace1f6502377","namespace":"selenosis"},"message":"Browser is in Failed state, nothing to do"}Suspected root cause
Workaround