Skip to content

Apply default livenessProbe and readinessProbe to the user container  #4014

Closed

Description

@chizhg

In what area(s)?

/area test-and-release

Describe the feature

According to the second paragraph of Meta Requests in Knative Runtime Contract, we should apply default livenessProbe and readinessProbe to the user container when they are not specified, and have them the following settings:

  • tcpSocket set to the container's port
  • initialDelaySeconds set to 0
  • periodSeconds set to platform-specific value

@tcnghia @mattmoor @markusthoemmes

Activity

  1. added
    kind/feature
    on May 6, 2019
  2. added
    area/test-and-release
    kind/spec
    on May 6, 2019
  3. markusthoemmes commented on May 6, 2019

    @markusthoemmes
    Contributor

    In theory we have this (we don't do liveness probes though) implemented via the queue-proxy, which does this exact probe.

  4. dgerd commented on May 6, 2019

    @dgerd

    QueueProxy Probe on Admin Interface:

    queueReadinessProbe = &corev1.Probe{

    QueueProxyHandler Setup on Admin Interface:

    func createAdminHandlers() *http.ServeMux {

    Probe Handler:

    queueReadinessProbe = &corev1.Probe{

  5. dgerd commented on May 6, 2019

    @dgerd

    We do have something here. Some areas where this doesn't match well with the description:

    1. LivenessProbe is not configured
    2. "Platform-specific value" makes me think this is configuration; however, periodSeconds is hard-coded in the queueProxy
    3. "Default" makes me think that user specified probes override this behavior, but instead they are applied concurrently.

    I think we could go either way on whether to update the contract, or to update the implementation for each of these things. I do however want to make them consistent.

  6. added a commit that references this issue on May 7, 2019
  7. dgerd commented on May 8, 2019

    @dgerd

    After discussion in the API working group meeting, this is my understanding of where we landed. Please correct if I missed something or misunderstood.

    On the contract/specification side:

    1. LivenessProbe should not be configured by default. This part of the statement should be removed from the runtime contract.

    On the implementation side:

    1. The default TCP probe behavior should be disabled when a user specifies a custom readinessProbe.
    2. The default TCP readinessProbe should be added by the webhook and appear on the Revision spec.
    3. Custom readiness probes defined by the user should be translated to health checks that are done BY the queue-proxy against the user-container, and removed from the user container.
    4. We should understand if our queue-proxy http server startup time is causing Good gRPC deployment pods frequently fail at least one health check #3308. If it is we should consider using an execProbe on the queue-proxy to perform the healthcheck against the user-container. If it is not, we should take a look at how fast we timeout on health checking the user container.
  8. added this to the Serving 0.7 milestone on May 10, 2019
  9. joshrider commented on May 13, 2019

    @joshrider
    Contributor

    /assign @joshrider

  10. joshrider commented on Jun 7, 2019

    @joshrider
    Contributor

    /assign @shashwathi

  11. 1 remaining item

  12. mattmoor commented on Jun 12, 2019

    @mattmoor
    Contributor

    Few thoughts:

    1. I think periodSeconds: 0 should mean do it as the system wants to.
    2. I don't think the system default needs to be reflected back into the yaml (and here in fact cannot be)
    3. If periodSeconds is specified we should respect it.
    4. I think that we should disallow failureThreshold if periodSeconds is unspecified, but I think successThreshold still makes sense.
  13. joshrider commented on Jun 19, 2019

    @joshrider
    Contributor

    @mattmoor @dgerd

    Clarifying question: if the user specifies an HTTP probe with periodSeconds: 0, do we want that to be invalid or do we want to translate that to the aggressive retry configuration?

  14. mattmoor commented on Jun 19, 2019

    @mattmoor
    Contributor

    aggressive retries.

  15. mattmoor commented on Jun 25, 2019

    @mattmoor
    Contributor

    The base change is in. I'd like to see this land as early in 0.8 as we can, so it can bake. Please LMK if you have questions or need reviews.

  16. joshrider commented on Jun 26, 2019

    @joshrider
    Contributor

    Not to jinx anything, but the e2e tests just passed. Have some housekeeping and cleanup to do, but hope to have something up for feedback at the end of the week.

  17. mattmoor commented on Jun 26, 2019

    @mattmoor
    Contributor

    @joshrider That's awesome news, LMK when things are RFAL.

  18. mattmoor commented on Jul 2, 2019

    @mattmoor
    Contributor

    @joshrider did you jinx it? 😲

  19. joshrider commented on Jul 2, 2019

    @joshrider
    Contributor

    Guess it's hard to argue that I didn't at this point...

    Just put something up with a WIP tag. #4600
    Lots to look at and feedback greatly appreciated. Will also need to be shepherded through CLA-land manually.

    @mattmoor @dgerd

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

Metadata

Metadata

Labels

P1area/test-and-releasekind/featurekind/spec

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions