Skip to content

when kn service create fails, there is no container error message #9326

Closed

Description

@ericmillin

I originally opened the issue in client repo, but they said the error message comes from serving. knative/client#998

Bug report

When a service create fails, sometimes the revision container error is empty, i.e. Container failed with: .. E.g.,

❱❱ kn service create example2 --image busybox
Creating service 'example2' in namespace '57aca2f5-aea8':

  0.731s The Configuration is still working to reflect the latest desired specification.
  1.100s The Route is still working to reflect the latest desired specification.
  1.100s Configuration "example2" is waiting for a Revision to become ready.
 19.764s Revision "example2-bpphv-1" failed with message: Container failed with: .
 19.765s Configuration "example2" does not have any ready Revision.
Error: RevisionFailed: Revision "example2-bpphv-1" failed with message: Container failed with: .
Run 'kn --help' for usage

kn service describe example2 has the same problem.

Expected behavior

Some sort of error message, ideally a helpful one

Steps to reproduce the problem

Run kn service create example --image busybox

(And yes, I understand why this example fails. It is simply an easy way to reproduce the behavior.)

Versions

❱❱ kn version
Version:      v20200821-4ea31c44
Build Date:   2020-08-21 10:36:33
Git Revision: 4ea31c44
Supported APIs:
* Serving
  - serving.knative.dev/v1 (knative-serving v0.17.0)
* Eventing
  - sources.knative.dev/v1alpha2 (knative-eventing v0.17.0)
  - eventing.knative.dev/v1beta1 (knative-eventing v0.17.0)

Activity

  1. added
    kind/bug
    on Sep 7, 2020
  2. markusthoemmes commented on Oct 8, 2020

    @markusthoemmes
    Contributor

    Sorry for the late response. Why did the service fail in your case?

  3. github-actions commented on Jan 7, 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.

  4. added
    lifecycle/stale
    on Jan 7, 2021
  5. ericmillin commented on Jan 7, 2021

    @ericmillin
    Author

    @markusthoemmes In this example it fails because there's no port open. But that merely reproduces the problem. It occurs in other instances as well. The problem is the lack of a message.

  6. markusthoemmes commented on Jan 13, 2021

    @markusthoemmes
    Contributor

    We should improve this.

    /remove-lifecycle-stale

  7. removed
    lifecycle/stale
    on Jan 23, 2021
  8. senthilnathan commented on Jan 26, 2021

    @senthilnathan
    Contributor

    I am observing a different behaviour with the HEAD.

    $ kn service create example2 --image busybox
    Creating service 'example2' in namespace 'default':
    
      0.173s The Configuration is still working to reflect the latest desired specification.
      0.312s The Route is still working to reflect the latest desired specification.
      0.409s Configuration "example2" is waiting for a Revision to become ready.
    Error: timeout: service 'example2' not ready after 600 seconds
    Run 'kn --help' for usage
    
    $ kn version
    Version:      v20210125-c503b88b
    Build Date:   2021-01-25 10:44:33
    Git Revision: c503b88b
    Supported APIs:
    * Serving
      - serving.knative.dev/v1 (knative-serving v0.20.0)
    * Eventing
      - sources.knative.dev/v1alpha2 (knative-eventing v0.20.0)
      - eventing.knative.dev/v1beta1 (knative-eventing v0.20.0)
    

    @ericmillin, are you still seeing the issue?

  9. ustiugov commented on Mar 5, 2021

    @ustiugov

    we still observe such issues with Knative Serving v0.19
    vhive-serverless/vHive#158 (comment)

  10. added this to the 0.22.x milestone on Mar 5, 2021
  11. dprotaso commented on Mar 5, 2021

    @dprotaso
    Member

    I think this falls into the class of issues I'm going to look at next where we don't handle failure modes well

  12. evankanderson commented on Mar 22, 2021

    @evankanderson
    Member

    /area API

    /triage accepted

    Not sure if you want to add enough text here to make this a /good-first-issue, @dprotaso

  13. added
    area/API
    triage/accepted
    on Mar 22, 2021
  14. removed this from the 0.22.x milestone on Apr 6, 2021
  15. 7 remaining items

  16. modified the milestones: 0.25.x, 0.26.x on Aug 26, 2021
  17. modified the milestones: 0.26.x, 0.27.x on Oct 6, 2021
  18. modified the milestones: v1.0.0, v1.1.0 on Nov 3, 2021
  19. modified the milestones: v1.1.0, v1.2.0 on Jan 4, 2022
  20. modified the milestones: v1.2.0, v1.3.0 on Feb 2, 2022
  21. psschwei commented on Mar 9, 2022

    @psschwei
    Member

    Can confirm that the error message is still empty on v1.3:

    $ kn service create example --image busybox
    Creating service 'example' in namespace 'default':
    
      0.050s The Route is still working to reflect the latest desired specification.
      0.059s Configuration "example" is waiting for a Revision to become ready.
    120.645s Revision "example-00001" failed with message: Container failed with: .
    120.670s Configuration "example" does not have any ready Revision.
    Error: RevisionFailed: Revision "example-00001" failed with message: Container failed with: .
    Run 'kn --help' for usage
    

    Looking at the controller logs, the container is actually exiting with exit code 0:

    {
      "severity":"INFO",
      "timestamp":"2022-03-09T21:09:23.058328759Z",
      "logger":"controller",
      "caller":"revision/reconcile_resources.go:103",
      "message":"marking exiting with: 0/",
      "commit":"f52ae88",
      "knative.dev/pod":"controller-798994c5bd-29tk4",
      "knative.dev/controller":"knative.dev.serving.pkg.reconciler.revision.Reconciler",
      "knative.dev/kind":"serving.knative.dev.Revision",
      "knative.dev/traceid":"28cff013-19c4-4551-a280-f60f9be6c59e",
      "knative.dev/key":"default/example-00001",
      "knative.dev/deployment":"example-00001-deployment"
    }
    

    And looking at what's happening in the containers themselves, queue-proxy is up but not ready then starts hitting aggressive probe errors (as the user-container isn't ready) before eventually going through its usual shutdown routine (term signal, sleep 30s, then shutdown) and exiting without error (hence the 0 exit code).

  22. psschwei commented on Mar 9, 2022

    @psschwei
    Member

    @dprotaso is this still on your todo list?

  23. modified the milestones: v1.3.0, v1.4.0 on Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/APIkind/bugtriage/accepted

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions