Skip to content

Curling a pod with failed readinessProbe should not hang #10765

Open

Description

@julz

What version of Knative?

all recent versions

Expected Behavior

Curling a pod with a readiness probe set (with periodSeconds=0 to avoid the behaviour in #10764), should either error immediately or succeed due to us scaling things up / terminating the pod (needs discussion about what the right behaviour is!).

Actual Behavior

Curling a pod with a failed readiness check hangs (unless there are other scaled-up pods for the request). The pod is never killed, because there is no liveness probe, but the set of routable pods is empty. In upstream k8s you would get a "no healthy upstream" error, in knative your curl hangs 😢.

Steps to Reproduce the Problem

  1. ko apply -f https://github.com/julz/readybutnotsteady/blob/main/service-no-period.yaml
  2. Wait for startup to succeed
  3. curl readynotsteady.default.$domain/start-failing
  4. Wait a few seconds for the pod to go unready
  5. curl readynotsteady.default.$domain (hangs).

Activity

  1. added
    kind/bug
    on Feb 12, 2021
  2. evankanderson commented on Mar 15, 2021

    @evankanderson
    Member

    /area networking
    /area autoscale
    /triage accepted

    It sounds like we have a test case for this, so it just needs hands to work it?

  3. julz commented on Mar 22, 2021

    @julz
    ContributorAuthor

    I think we need to settle on what the right behaviour is here: hanging seems pretty wrong and unexpectedly different from k8s, but should we scale up (so, ignore non-ready pods for purposes of desired, at least eventually), terminate the pod (so effectively introduce an implicit liveness check), error out after timeout if nothing goes ready again, or just document that readiness probes are a real bad idea for knative :/ ?.

  4. github-actions commented on Jun 21, 2021

    @github-actions

    This issue is stale because it has been open for 90 days with no
    activity. It will automatically close after 30 more days of
    inactivity. Reopen the issue with /reopen. Mark the issue as
    fresh by adding the comment /remove-lifecycle stale.

  5. added
    lifecycle/stale
    on Jun 21, 2021
  6. added this to the Ice Box milestone on Jun 21, 2021
  7. removed
    lifecycle/stale
    on Jul 2, 2021
  8. julz commented on Jul 8, 2021

    @julz
    ContributorAuthor

    /remove-lifecycle stale.
    /reopen
    /lifecycle frozen

  9. added
    lifecycle/frozen
    on Jul 8, 2021
  10. mattmoor commented on Jun 12, 2022

    @mattmoor
    Contributor

    To clarify, the behavior is to hang if the activator is in the request path.

    I just ran a setup with target-burst-capacity: 0 configured globally, and was startled that timing out (the behavior with TBC=200) was a conformance requirement. 🤔

    Given the following comment, I am inclined to relax things to "requests fail", so that conformance doesn't have a hard requirement that things match the upstream semantics bug-for-bug:

    // The goal of this test is largely to describe the current behaviour, so that
    // we can confidently change it.
    // See https://github.com/knative/serving/issues/10765.

  11. evankanderson commented on Jun 14, 2022

    @evankanderson
    Member

    I'm slightly confused by conformance having anything to say about "curl the pod", since conformance shouldn't talk about Pods at all (and some implementations don't have them).

    In fact, I don't see why this is in the conformance tests at all, and it seems entirely conformant to start a second pod if the first pod is reporting not ready.

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

    area/autoscalearea/networkingkind/buglifecycle/frozentriage/accepted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions