Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lvjing2 If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @lvjing2. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
vagababov
left a comment
There was a problem hiding this comment.
Is there a related issue?
|
/ok-to-test I would like to see an integration test for this as well. |
|
The following is the coverage report on pkg/.
|
|
Also, please run unit tests locally before posting PRs... |
|
The following is the coverage report on pkg/.
|
|
|
Then it should be attached to the issue, so it can get closed and tracked :) You can edit the first message. |
|
@lvjing2: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
| logger.Debug("Metrics are not yet being collected.") | ||
| return desiredScale, nil | ||
| // check is activating timeout | ||
| if pa.Status.IsActivatingTimeout(autoscalerConfig.ActivatingTimeout) { |
There was a problem hiding this comment.
I don't think that this is correct. It should not really matter in the negative case at all.
| if pa.Status.IsActivating() { // Active=Unknown | ||
| // Don't scale-to-zero during activation | ||
| if min, _ := pa.ScaleBounds(); min == 0 { | ||
| if pa.Status.IsActivatingTimeout(config.ActivatingTimeout) { |
There was a problem hiding this comment.
This code was the main code that did scale to zero, so it should've remained somewhere, right?
|
|
||
| // IsActivatingTimeout checks whether the pod autoscaler has been in activating | ||
| // for at least the specified timeout period. | ||
| func (pas *PodAutoscalerStatus) IsActivatingTimeout(activatingTimeout time.Duration) bool { |
There was a problem hiding this comment.
Probably here and in the config-map, etc "Activation Timeout" is a more correct name.
|
|
||
| if pa.Status.IsActivating() { | ||
| timeout := config.FromContext(ctx).Autoscaler.ActivatingTimeout | ||
| logger.Infof("enqueue delay for check activating timeout after %v.", timeout) |
There was a problem hiding this comment.
Logging statement.
| logger.Infof("enqueue delay for check activating timeout after %v.", timeout) | |
| logger.Infof("Enqueue with delay to check activation timeout after %v.", timeout) |
markusthoemmes
left a comment
There was a problem hiding this comment.
Sorry to add to the pile but there is #4094 trying to fix this as well.
There have been discussions on how to best attack this and the kind of agreed upon solution is to surface the revision's status in the PodAutoscaler so it can act on that. We already have deployment timeouts and handling of defunct pods in the revision handling so that makes sure we're not duplicating things. The ActivatingTimeout you're proposing essentially duplicates the timeout logic that already lives on the revision level.
/hold
To make sure this gets discussed.
|
@markusthoemmes Hi, I didn't recognized that there is already timeout for revision. if so, I think it would be better if we can unify the timeout status of revision and kpa by #4094 . |
|
/close Per last comment. |
|
@markusthoemmes: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes #
problematic pods can't be scale to zero forever.
Proposed Changes
check whether activating is timeout or not, if timeout, then scale to zero if
min==0, andEnableScaleToZero=trueRelease Note