Repository navigation
Description
#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
cdlliuy commentedon Nov 10, 2020
@julz @markusthoemmes @mattmoor , any comment?
markusthoemmes commentedon Nov 10, 2020
This might be a duplicate of #9531.
cdlliuy commentedon Nov 10, 2020
@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.
github-actions commentedon Feb 9, 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.