Skip to content

Avoid intermittent schedule failure msg to end-user #10076

Closed

Description

@cdlliuy

#In what area(s)?
Remove the '> ' to select

/area API

What version of Knative?

0.17.x

Actual & Expected Behaviour

we are running with cluster-autoscaler, and https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-can-i-configure-overprovisioning-with-cluster-autoscaler to put some low-priority pause pod in the cluster.
When the worker node cpu/memory are not nearly 99% (30% of them are occupied by the pause pods), we create a knative service with kn, and got error:

kn service create hello --image xxx --wait-timeout 300 --env TARGET=revision1 
Creating service 'hello' in namespace:
  0.380s The Route is still working to reflect the latest desired specification.
  1.253s Configuration "hello" is waiting for a Revision to become ready.
  4.249s Revision "hello-xxx" failed with message: 0/15 nodes are available: 1 Insufficient memory, 14 Insufficient cpu..
  5.077s Configuration "hello" does not have any ready Revision.
Error: RevisionFailed: Revision "hello-xxx" failed with message: 0/15 nodes are available: 1 Insufficient memory, 14 Insufficient cpu..

I checked with k8s scheduler team that the pod schedule will happen in 2 stage, the 1st pod placement attempt failed and the scheduler preempted low-priority Pods; then the 2nd pod placement attempt succeed. So as a result , the final knative service reconcile succeed.

But when using kn client, the end-user got the scary failed msg .. If the end-user don't have enough knowledge for the k8s reconcile, he/she will be scary.

The issue was previously reported in knative/client#1023 for know client.
But when checking further with k8s scheduler team, I found another approach to resolve it.

When the scheduler failed with the 1st placement but did a successful preemption, the desired Pod will have .status.nominatedNodeName field set to the proposed node. So that later, the scheduler will put the desired pod to the node defined by nominatedNodeName directly.

So, in the revision controller, once we get the deployment failure msg, but the pod has .status.nominatedNodeName set, that means it will be scheduled soon.

Can we use this fact to avoid intermittent failure directly?

Activity

  1. added
    kind/bug
    on Nov 10, 2020
  2. cdlliuy commented on Nov 10, 2020

    @cdlliuy
    Author
  3. markusthoemmes commented on Nov 10, 2020

    @markusthoemmes
    Contributor

    This might be a duplicate of #9531.

  4. cdlliuy commented on Nov 10, 2020

    @cdlliuy
    Author

    @markusthoemmes , yeah, it talks about the similar situation when resource is not ready.
    But in order to wait on the scheduler passively until the ProgressDeadline reached, I am trying to understand whether it is possible to consider .status.nominatedNodeName .
    If this entry is set , then revision controller can determine that a good scheduling will happen sure, so it can hide the error msg to enduser.
    If this entry is not set, we can be back to normal handling process.

  5. github-actions commented on Feb 9, 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.

  6. added
    lifecycle/stale
    on Feb 9, 2021
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/stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions