Skip to content

Fail activation if we exceed a timeout#4614

Merged
knative-prow-robot merged 6 commits intoknative:masterfrom
jonjohnsonjr:inactive-timeout
Jul 9, 2019
Merged

Fail activation if we exceed a timeout#4614
knative-prow-robot merged 6 commits intoknative:masterfrom
jonjohnsonjr:inactive-timeout

Conversation

@jonjohnsonjr
Copy link
Copy Markdown
Contributor

@jonjohnsonjr jonjohnsonjr commented Jul 3, 2019

This partially addresses #3456

The KPA reconciler will consider activation to have TimedOut if it is activating (Active=Unknown) for ProgressDeadlineSeconds (this is currently a hardcoded constant, but we might want to make it configurable in the future if we revive #810) and scale the deployment to zero, since we don't expect activation to ever succeed.

The Revision reconciler gets triggered after ProgressDeadlineSeconds because the Deployment that it watches will have it status update with Progressing=False,Reason=ProgressDeadlineExceeded. The Revision reconciler currently does pod failure diagnosis, which breaks if the pods get scaled down to zero. To avoid breaking that, the KPA reconciler will wait for ProgressDeadlineSeconds + 10 seconds before scaling to zero, to give the Revision reconciler an opportunity to look at the pod status. In the future we can make the KPA responsible for pod failure diagnosis to remove this race (and the 10 second buffer).

This PR is a continuation of #4094, but I've split apart the not-scaling-to-zero part from the lifecycle changes to make the PR smaller.

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 3, 2019
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 3, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 3, 2019
@jonjohnsonjr
Copy link
Copy Markdown
Contributor Author

/assign @vagababov WDYT?

Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonjohnsonjr: 0 warnings.

Details

In 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.

Comment thread pkg/reconciler/autoscaling/kpa/kpa.go
Comment thread pkg/reconciler/autoscaling/kpa/scaler.go Outdated
Comment thread pkg/reconciler/revision/resources/deploy.go
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 3, 2019
This avoids racing the Revision reconciler, which needs to inspect pod
statuses before we scale down the Deployment.
@jonjohnsonjr
Copy link
Copy Markdown
Contributor Author

/retest

@jonjohnsonjr jonjohnsonjr marked this pull request as ready for review July 8, 2019 20:52
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2019
@jonjohnsonjr
Copy link
Copy Markdown
Contributor Author

/retest

Copy link
Copy Markdown
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/assign @mattmoor
I'd like Matt to take a look just in case.

Comment thread pkg/reconciler/autoscaling/kpa/scaler.go Outdated
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2019
Comment thread pkg/reconciler/autoscaling/kpa/kpa_test.go Outdated
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2019
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/autoscaling/v1alpha1/pa_lifecycle.go 98.0% 98.1% 0.0
pkg/reconciler/autoscaling/kpa/kpa.go 92.2% 92.4% 0.1
pkg/reconciler/autoscaling/kpa/scaler.go 88.9% 89.4% 0.5

Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonjohnsonjr, mattmoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2019
@jonjohnsonjr
Copy link
Copy Markdown
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers area/autoscale cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants