You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Operator stops reconciling permanently after its watch connections drop while idle #936
The trino, hive and airflow operators flip from recoverable watch-stream errors to a permanent failed to start watching object: client error (Connect) loop and never reconcile again until the pod is restarted. While wedged the operator looks healthy to Kubernetes: the process is running, its conversion webhook still answers.
Expected
A controller whose watch connection is dropped re-establishes it and continues reconciling, as it does for the first several drops.
Actual
ERROR kube_client::client::builder: failed with error client error (Connect)
WARN stackable_operator::logging::controller: Queued reconcile resulted in an error
controller.name="trinocluster.trino.stackable.tech"
error=failed to start watching object: ServiceError: client error (Connect)
error.sources=[ServiceError: client error (Connect), client error (Connect), deadline has elapsed]
The problems seems to be upstream in kube-rs: https://github.com/kube-rs/kube/blob/main/kube-runtime/src/controller/mod.rs#L1704
Possible explanation for this issue: All watch triggers get merged into a single stream that then gets joint backoff - so if an operator watches e.g. 7 resources, the backoff fires instantly 6 times, which quickly leads to high sleep durations that ultimately go beyond the timeout.
While kube-rs has a long timeout configured (>200 secs) on the observed cluster some kind of proxy for the apiserver seems to terminate idle watches after 60 seconds, which is reliably triggered for the mentioned operators.
We should raise the log level to see more (debug) output from our and kube's code. This should give us more insights. See our docs.
Why are we hitting a big number of failures (which all raise the exponential backoff) all at once? Is it because the cluster's timeout is way lower than kube's default timeout?
Could we potentially dynamically fetch the configured timeout and use that in kube. This is potentially something we could do on our side, but I can also see kube doing that.
I would recommend raising this issue upstream. Two ideas we could raise:
Maybe suggest that the backoff of a stream should be applied to individual elements (but that will be very tricky and basically the opposite what you want to achieve with a stream)
Maybe limit the maximum number of consecutive backoff triggers with a burst limit. This would stop the sudden explosion of the exponential backoff.
Activity
lfrancke commentedon Aug 28, 2026
Whatever we might fix upstream or in our code: Should something like this not also trigger a condition that marks our operator as unhealthy?
sweb commentedon Aug 28, 2026
A regular probe would not detect this - you would have to check the connectivity between controller and api server.
Techassi commentedon Sep 3, 2026
A few thoughts on this: