Skip to content

[Problem RFC] Node Clock Drift Silently, Breaks TLS While Pods Stay Running #826

Closed

Description

@haani-maybe

Hello! I'm working on the evaluation task and would like to propose a new SREGym benchmark problem based on node clock drift causing TLS handshake failures (reference links attached)

Advancing a worker node's system clock significantly forward causes all pods on that node to fail outbound TLS connections with certificate has expired or is not yet valid; this is not because any certificate is actually bad, but because the skewed clock makes even a valid certificate APPEAR expired from that node's perspective.
The issue here is that the certificates are completely healthy so an agent has to keep digging to find the fault. All pods stay Running throughout so hypothetically the main signal is just the x509 errors in application logs that look identical to a cert misconfiguration and that makes it harder to diagnose the root cause.

Real-world examples this is heavily inspired by are linked here as sources:
hashicorp/vault#11150; (this is the main match since NTP stopped running here)
D2iQ time drift support article; documents a Kubernetes cluster where etcd began rejecting connections with the same x509 error while kubectl get pods appeared fine in terms of result
Cloudflare leap second; not exact issue but interesting comparison case where NTP correctly stepping the clock backward by one second, mainly used as inspiration to demonstrates small clock drifts cascading
kubernetes/kubernetes#76714 ; example production of the error by advancing a system clock a display of the fact that it occurs naturally when cloud VM clocks drift
(The existing problems/ PRs handle genuine expiry or config mismatches, and another interesting match was Problem ID cpu_clocksource_failure listed in the Problem List which targets hardware TSC/RTC instability instead, whereas here the clock jumps forward via NTP shutdown and the main visible symptom is TLS validation failure)

For implementing this into SREGym, i'll utilize hotel_reservation (used in the quiz too) since it supports TLS natively and the fault has a real TLS surface to break without any additional app wiring needed. The problem would hypothetically inject the fault by targeting one worker node whose init container advances the system clock and disables NTP; recovery would then restore the sync.

The oracle should verify the node clock is back within acceptable tolerance of the rest of the cluster and NTP is confirmed restored. Restarting pods wouldn’t pass since the clock remains broken underneath and connections from that node will keep failing.

Does this make sense? As this direction is a bit nitpicky, any and all feedback is appreciated. thank you!

Activity

  1. Saadmrp1038 commented on May 30, 2026

    @Saadmrp1038
    Collaborator

    @haani-maybe You came up with another RFC so quick!

    I think the hotel-reservation app's TLS is off by default, so you'll need to do some setup there. We recently added a bunch of TLS-related faults, you can take inspiration from those.

    One major concern I have is that this fault might need separate handling for kind and a real cluster. I'm not sure if the implementation can be done on kind, it depends on how kind handles clock time. Feel free to test out an implementation, but be mindful of this part. Check that the fault works correctly on kind and doesn't break the cluster.

  2. haani-maybe commented on May 30, 2026

    @haani-maybe
    ContributorAuthor

    @haani-maybe You came up with another RFC so quick!

    I think the hotel-reservation app's TLS is off by default, so you'll need to do some setup there. We recently added a bunch of TLS-related faults, you can take inspiration from those.

    One major concern I have is that this fault might need separate handling for kind and a real cluster. I'm not sure if the implementation can be done on kind, it depends on how kind handles clock time. Feel free to test out an implementation, but be mindful of this part. Check that the fault works correctly on kind and doesn't break the cluster.

    hahah it's funny that you noticed! thank you for the fast responses!
    I actually came up with this RFC and its references first, but my previous RFC seemed a bit more substantial in terms of my own implementation idea so I went with that instead

    and you're right, it's not going to work on kind (as far as I can tell) because the nodes would all experience the clock drift together and any changes to the clock would be global, so it wouldn't be feasible on kind at all (rather than separately handled)
    I figured since the README states that not all problems are compatible on kind and the kubernetes cluster was Recommended anyway it would be fine, but do you think I should reconsider and draft an RFC that is universally compatible instead?

  3. Saadmrp1038 commented on May 30, 2026

    @Saadmrp1038
    Collaborator

    @haani-maybe Yeah, since kind uses the host kernel's clock time, it would affect everything.

    I figured since the README states that not all problems are compatible on kind and the kubernetes cluster was recommended.

    That's correct!
    But since most people don't have access to a real cluster, they are testing in kind. I was worried you wouldn't be able to test your code. If you can do a real cluster-only implementation, I am totally fine with that. Not everything is suitable for kind. We actually already have some faults that don't run on kind.

  4. tianyin commented on Jun 21, 2026

    @tianyin
    Contributor

    close the RFC as it is actively discussed in #894.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions