Repository navigation
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIssues which should be fixed (post-triage)
Description
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?
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIssues which should be fixed (post-triage)
Activity
psschwei commentedon Aug 19, 2021
I looked into this a little today, using Serving v0.25.0 and kourier networking layer on IKS.
A couple of notes:
Agree that it would be useful for the ksvc to show an error (rather than OK) if it's having problems pulling the image.
julz commentedon Aug 24, 2021
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.
julz commentedon Aug 24, 2021
/assign
/triage needs-user-input
duglin commentedon Aug 25, 2021
I’d say one of the existing conditions. Using a Kube event is risky because those get gc’d after about an hour.
julz commentedon Aug 25, 2021
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.
github-actions commentedon Nov 24, 2021
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 asfresh by adding the comment
/remove-lifecycle stale.duglin commentedon Nov 24, 2021
/remove-lifecycle stale
github-actions commentedon May 15, 2022
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 asfresh by adding the comment
/remove-lifecycle stale.psschwei commentedon May 15, 2022
/lifecycle frozen