-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master/node clock skew will affect deployment's pod availability check #29229
Comments
Real clocks or physical time are not perfectly accurate even time synchronization is on. Some kind of virtual time could be better. |
The node should have access to the clock skew of the master via the date header returned on responses. It's likely that in the future we'd want a story to deal with node/master clock skew consistently. We have ve said you must run your cluster with low time skew. I think in the short term the deployment controller should create a virtual clock (like the node controller and namespace controller do) for dealing with timestamps. The deployment controller can at least bracket between creation time and pod accepted by kubelet time and start the clock when it observes the pod. I think we want to remove any time.Now() comparisons and replace them with observed clock skew from the master's reference frame. |
xref: #6159 |
An alternative to virtual clocks is minReadySeconds on the pod level (@bgrant0607 has already asked for it). |
Note that the node controller already had to deal with this. IIRC, it didn't actually use the timestamps in the condition, but started its own timers when observing transitions. |
The kubelet, namespace, and node controller also do that for graceful On Tue, Sep 27, 2016 at 10:59 PM, Brian Grant notifications@github.com
|
We need a virtual clock in the deployment controller also for deployment conditions. See #35691 (comment) for more context. |
I like the option of a private timer in the deployment controller. We think we have seen this in the wild. Too late to fix in 1.5. Targeting 1.6. |
FWIW, the availability check "moved" in the replica set controller, meaning we should add the virtual clock in the replica set controller if we want to solve this by using a virtual clock. I guess all controllers that deal with Pods should use virtual clocks in the long term. |
We probably want to tie that clock as well to delaying work queue and
others.
On Dec 8, 2016, at 8:55 AM, Michail Kargakis <notifications@github.com> wrote:
FWIW, the availability check "moved" in the replica set controller, meaning
we should add the virtual clock in the replica set controller if we want to
solve this by using a virtual clock. I guess all controllers that deal with
Pods should use virtual clocks in the long term.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29229 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p716MtV22fowPKErnnwmSiy4xR8Hks5rGAxHgaJpZM4JQLjm>
.
|
I've got kubernetes/community#194 up for review (proposal for adding minReadySeconds to pods) and I have a preliminary buggy working implementation of it locally but the concerns raised by @thockin regarding the ready condition being ambiguous already got me thinking of following the simplest solution possible ie. using a virtual clock in the replica set controller. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Found this in: #26834 (comment)
When a deployment controller checks if a pod is available, it compares master's time (
time.Now()
) against node's time (pod.Status.Conditions[].LastTransitionTime
+deployment.spec.minReadySeconds
). If the master's and the node's clocks are off by more than seconds, the pod availability check wouldn't work as expected.@kubernetes/deployment
The text was updated successfully, but these errors were encountered: