Skip to content

No indication of an error bubbled up to the ksvc #11717

Open

Description

@duglin

Once deployed, and after scaled down to zero, if there's an error scaling back up then it appears that there's no error message shown to the user in the ksvc. Here's a sample flow:

  • create a ksvc - image: duglin/bug - everything comes up ok
  • let things scale down to zero
  • delete duglin/bug
  • curl the app and I get this:
$ curl -v http://bug-default.kndev2-78a07a02fd786bfb6bcc17ab72c5a19d-0000.us-south.containers.appdomain.cloud
* Rebuilt URL to: http://bug-default.kndev2-78a07a02fd786bfb6bcc17ab72c5a19d-0000.us-south.containers.appdomain.cloud/
*   Trying 169.48.95.69...
* TCP_NODELAY set
* Connected to bug-default.kndev2-78a07a02fd786bfb6bcc17ab72c5a19d-0000.us-south.containers.appdomain.cloud (169.48.95.69) port 80 (#0)
> GET / HTTP/1.1
> Host: bug-default.kndev2-78a07a02fd786bfb6bcc17ab72c5a19d-0000.us-south.containers.appdomain.cloud
> User-Agent: curl/7.58.0
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host bug-default.kndev2-78a07a02fd786bfb6bcc17ab72c5a19d-0000.us-south.containers.appdomain.cloud left intact
curl: (52) Empty reply from server

I look at the status of the ksvc and I see:

status:
  address:
    url: http://bug.default.svc.cluster.local
  conditions:
  - lastTransitionTime: "2021-07-24T13:38:15Z"
    status: "True"
    type: ConfigurationsReady
  - lastTransitionTime: "2021-07-24T13:38:16Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2021-07-24T13:38:16Z"
    status: "True"
    type: RoutesReady
  • Notice no indication that things are busted
  • check the revision:
status:
  actualReplicas: 0
  conditions:
  - lastTransitionTime: "2021-07-24T13:39:59Z"
    message: Requests to the target are being buffered as resources are provisioned.
    reason: Queued
    severity: Info
    status: Unknown
    type: Active
  - lastTransitionTime: "2021-07-24T13:38:15Z"
    status: "True"
    type: ContainerHealthy
  - lastTransitionTime: "2021-07-24T13:38:15Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2021-07-24T13:38:15Z"
    status: "True"
    type: ResourcesAvailable

The "Active" condition does seem to give a hint, but I'm not sure a normal user would know that that means - nor is it clear that there's anything wrong. Instead it sounds like things are just in a "queued" state.

Should we have bubbled up the error message from the pod (about not being able to pull the image) all the way to the ksvc so the user can see it w/o having to drop down into Kube resources?

Activity

  1. added
    kind/bug
    on Jul 24, 2021
  2. psschwei commented on Aug 19, 2021

    @psschwei
    Member

    I looked into this a little today, using Serving v0.25.0 and kourier networking layer on IKS.

    A couple of notes:

    • Curling the app after deleting the image didn't result in an error for me. Looks like the image was deployed back to the same node and so didn't need to repull the image. I tried five or six times, and each time was the same. Not sure if that's a feature or a bug.
    • After deleting the node, however, I got the same errors as Doug.

    Agree that it would be useful for the ksvc to show an error (rather than OK) if it's having problems pulling the image.

  3. julz commented on Aug 24, 2021

    @julz
    Contributor

    In regular Kubernetes deployments the ProgressDeadline would kick in and give you an error message (and terminal-state failure) in a case like this, but I think we avoid doing that because it's difficult to square with scale from zero where you don't expect a temporary failure to mean the service never scales up again (once it has passed initScale, anyway). So I think we want to bubble an error up, but it can't be a terminal one.

    Assuming we all agree bubbling some sort of error up to the ksvc here makes sense (I certainly do), where would we expect the error to appear? New Condition? Message section of existing Active condition? Not a condition at all? Thoughts @duglin @dprotaso? If we can agree a general shape I'll happily pick up the work to land this.

  4. julz commented on Aug 24, 2021

    @julz
    Contributor

    /assign
    /triage needs-user-input

  5. added
    triage/needs-user-input
    on Aug 24, 2021
  6. duglin commented on Aug 25, 2021

    @duglin
    Author

    I’d say one of the existing conditions. Using a Kube event is risky because those get gc’d after about an hour.

  7. julz commented on Aug 25, 2021

    @julz
    Contributor

    ok, looks like we already have code to propagate errors up in the case that things are crashing or resource are unavailable, but it doesn't handle unavailable images. I'm going to try extending this to handle image failures.

  8. github-actions commented on Nov 24, 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.

  9. added
    lifecycle/stale
    on Nov 24, 2021
  10. duglin commented on Nov 24, 2021

    @duglin
    Author

    /remove-lifecycle stale

  11. removed
    lifecycle/stale
    on Nov 24, 2021
  12. removed their assignment
    on Feb 13, 2022
  13. github-actions commented on May 15, 2022

    @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.

  14. added
    lifecycle/stale
    on May 15, 2022
  15. psschwei commented on May 15, 2022

    @psschwei
    Member

    /lifecycle frozen

  16. added
    lifecycle/frozen
    and removed
    lifecycle/stale
    on May 15, 2022
  17. added
    triage/accepted
    and removed
    triage/needs-user-input
    on Feb 15, 2023
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

    kind/buglifecycle/frozentriage/accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions