Skip to content

Revision state set to "ready" for unhealthy user-container #11337

Closed

Description

@arbogast

In what area(s)?

/area API
/area autoscale

What version of Knative?

0.20.1

Expected Behavior

Revision state set to "failed" after progressDeadline with error like ProgressDeadlineExceeded

Actual Behavior

This happens not all the time, but still quite often. For unhealthy user-container - for example with application that listens on wrong port (let's say port 3000 when it should listen on port 8080) - queue-proxy never reaches "ready" state because of failed readiness probes. After ~10 minutes (time of progressDeadline) replicaset is scaled down and revision state is set to "ready".

Steps to Reproduce the Problem

  1. Prepare testing environment: minikube v1.20.0 and Knative v0.20.1 + Istio v0.21.0 as networking layer (Knative and Istio installed according to official docs page). Do not modify any default Knative configuration.
  2. Deploy ksvc (as described here) with unhealthy user-container - for example with application that listens on wrong port (let's say port 3000 when it should listen on port 8080)
  3. Wait until progressDeadline is reached. If revision is correctly set to "failed" with error ProgressDeadlineExceeded update ksvc so deployment of second revision will start, repeat this until incorrect behaviour can be noticed (in my case I usually get incorrect behaviour after first, second try)

Events from my recent test:

0s          Warning   Unhealthy               pod/helloworld-go-inv-port-00002-deployment-79cf444b89-7tgpv        Readiness probe failed:
0s          Warning   Unhealthy               pod/helloworld-go-inv-port-00002-deployment-79cf444b89-7tgpv        Readiness probe failed:
0s          Normal    ScalingReplicaSet       deployment/helloworld-go-inv-port-00002-deployment                  Scaled down replica set helloworld-go-inv-port-00002-deployment-79cf444b89 to 0
0s          Normal    SuccessfulDelete        replicaset/helloworld-go-inv-port-00002-deployment-79cf444b89       Deleted pod: helloworld-go-inv-port-00002-deployment-79cf444b89-7tgpv
0s          Warning   InternalError           revision/helloworld-go-inv-port-00002                               failed to update deployment "helloworld-go-inv-port-00002-deployment": Operation cannot be fulfilled on deployments.apps "helloworld-go-inv-port-00002-deployment": the object has been modified; please apply your changes to the latest version and try again
0s          Normal    RevisionReady           revision/helloworld-go-inv-port-00002                               Revision becomes ready upon all resources being ready
0s          Normal    ConfigurationReady      configuration/helloworld-go-inv-port                                Configuration becomes ready
0s          Normal    LatestReadyUpdate       configuration/helloworld-go-inv-port                                LatestReadyRevisionName updated to "helloworld-go-inv-port-00002"
0s          Normal    Created                 route/helloworld-go-inv-port                                        Created placeholder service "helloworld-go-inv-port"
0s          Normal    Created                 route/helloworld-go-inv-port                                        Created Ingress "helloworld-go-inv-port"
0s          Normal    FinalizerUpdate         ingress/helloworld-go-inv-port                                      Updated "helloworld-go-inv-port" finalizers
0s          Normal    RevisionReady           revision/helloworld-go-inv-port-00002                               Revision becomes ready upon all resources being ready
0s          Normal    Created                 ingress/helloworld-go-inv-port                                      Created VirtualService "helloworld-go-inv-port-mesh"
0s          Normal    Created                 ingress/helloworld-go-inv-port                                      Created VirtualService "helloworld-go-inv-port-ingress"

Ksvc description:

kn services describe helloworld-go-inv-port
Name:       helloworld-go-inv-port
Namespace:  default
Age:        31m
URL:        http://helloworld-go-inv-port.default.10.100.162.25.xip.io

Revisions:
  100%  @latest (helloworld-go-inv-port-00002) [2] (20m)
        Image:  docker.io/... (at a35c37)

Conditions:
  OK TYPE                   AGE REASON
  ++ Ready                   9m
  ++ ConfigurationsReady     9m
  ++ RoutesReady             9m

Two revisions for the same invalid user-container:

kn revisions describe helloworld-go-inv-port-00001
Name:       helloworld-go-inv-port-00001
Namespace:  default
Age:        33m
Image:      docker.io/... (at a35c37)
Env:        TARGET=Go Sample v1
Service:    helloworld-go-inv-port

Conditions:
  OK TYPE                  AGE REASON
  !! Ready                 22m ProgressDeadlineExceeded
  ?? ContainerHealthy      33m Deploying
  !! ResourcesAvailable    22m ProgressDeadlineExceeded
   I Active                22m NoTraffic
kn revisions describe helloworld-go-inv-port-00002
Name:       helloworld-go-inv-port-00002
Namespace:  default
Age:        22m
Image:      docker.io/... (at a35c37)
Env:        TARGET=Go Sample v11
Service:    helloworld-go-inv-port

Conditions:
  OK TYPE                  AGE REASON
  ++ Ready                 12m
  ++ ContainerHealthy      12m
  ++ ResourcesAvailable    12m
   I Active                12m NoTraffic

Activity

  1. added
    kind/bug
    on May 13, 2021
  2. added this to the 0.24.x milestone on Jun 3, 2021
  3. dprotaso commented on Jun 3, 2021

    @dprotaso
    Member

    Thanks for the report - this falls into a few class of errors I'll be tackling

  4. dprotaso commented on Jun 3, 2021

    @dprotaso
    Member

    /assign @dprotaso

  5. modified the milestones: 0.24.x, 0.25.x on Jul 6, 2021
  6. modified the milestones: 0.25.x, 0.26.x on Aug 26, 2021
  7. modified the milestones: 0.26.x, 0.27.x on Oct 6, 2021
  8. modified the milestones: v1.0.0, v1.1.0 on Nov 3, 2021
  9. modified the milestones: v1.1.0, v1.2.0 on Jan 4, 2022
  10. modified the milestones: v1.2.0, v1.3.0 on Feb 2, 2022
  11. nader-ziada commented on Mar 8, 2022

    @nader-ziada
    Member

    Can't seem to repro this issue,

    I get False ProgressDeadlineExceeded on the revision

  12. psschwei commented on Mar 8, 2022

    @psschwei
    Member

    Possibly some overlap with #12691

  13. modified the milestones: v1.3.0, v1.4.0 on Mar 10, 2022
  14. psschwei commented on Apr 5, 2022

    @psschwei
    Member

    Confirming @nader-ziada 's inability to reproduce the issue, using the following kservice on HEAD (to use the per-revision progress-deadline annotation, mostly to not have to wait too long):

    apiVersion: serving.knative.dev/v1
    kind: Service
    metadata:
     name: fails
     namespace: default
    spec:
     template:
       metadata:
          annotations:
            serving.knative.dev/progress-deadline: "10s"
       spec:
         containers:
          - image: nicolaka/netshoot

    results in a status of:

    status:
      conditions:
      - lastTransitionTime: "2022-04-05T20:48:34Z"
        message: 'Revision "fails-00001" failed with message: Container failed with: .'
        reason: RevisionFailed
        status: "False"
        type: ConfigurationsReady
      - lastTransitionTime: "2022-04-05T20:48:34Z"
        message: Configuration "fails" does not have any ready Revision.
        reason: RevisionMissing
        status: "False"
        type: Ready
      - lastTransitionTime: "2022-04-05T20:48:34Z"
        message: Configuration "fails" does not have any ready Revision.
        reason: RevisionMissing
        status: "False"
        type: RoutesReady
      latestCreatedRevisionName: fails-00001
      observedGeneration: 1
      url: http://fails.default.10.102.75.63.sslip.io
    

    @dprotaso think we can probably close this one (though the failure message could probably be better, but that's covered in #9326 )

  15. arbogast commented on Apr 6, 2022

    @arbogast
    Author

    It seems that problem disappeared in Knative 0.21 - I don't understand why, though.

    Thank you!

  16. psschwei commented on Apr 14, 2022

    @psschwei
    Member

    Closing since the issue seems to be resolved, can reopen if it's still an issue.
    /close

  17. knative-prow commented on Apr 14, 2022

    @knative-prow

    @psschwei: Closing this issue.

    Details

    In response to this:

    Closing since the issue seems to be resolved, can reopen if it's still an issue.
    /close

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Metadata

Metadata

Assignees

Labels

area/APIarea/autoscalekind/bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions