Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address 503s when the autoscaler is being rolled #12617

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented Feb 12, 2022

The activator's readiness depends on the status of web socket connection
to the autoscaler. When the connection is down the activator will report
ready=false. This can occur when the autoscaler deployment is updating.

PR #12614 made the activator's readiness aggressively fail after
a single probe failure. This didn't seem to impact istio (maybe it retries?) but with
contour it started returning 503s since the activator started to report ready=false
immediately.

This PR does two things to mitigate 503s:

  • bump the activator readiness threshold to give the autoscaler more time to
    rollout/startup. This still remains lower than the drain duration
  • Update the autoscaler rollout strategy so we spin up a new instance
    prior to bring down the older one. This is done using maxUnavailable=0

Fixes #12524 flake

Release Note

Ensure the activator drains properly and the autoscaler rolls out conservatively. This helps avoid hitting 503s during upgrade.

The activator's readiness depends on the status of web socket connection
to the autoscaler. When the connection is down the activator will report
ready=false. This can occur when the autoscaler deployment is updating.

PR knative#12614 made the activator's readiness probe fail aggressively after
a single failure. This didn't seem to impact istio but with contour it
started returning 503s since the activator started to report ready=false
immediately.

This PR does two things to mitigate 503s:
- bump the readiness threshold to give the autoscaler more time to
  rollout/startup. This still remains lower than the drain duration
- Update the autoscaler rollout strategy so we spin up a new instance
  prior to bring down the older one. This is done using maxUnavailable=0
@knative-prow-robot knative-prow-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 12, 2022
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #12617 (80051fe) into main (eda7173) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12617      +/-   ##
==========================================
- Coverage   87.52%   87.48%   -0.05%     
==========================================
  Files         195      195              
  Lines        9718     9718              
==========================================
- Hits         8506     8502       -4     
- Misses        928      931       +3     
- Partials      284      285       +1     
Impacted Files Coverage Δ
pkg/autoscaler/statserver/server.go 77.66% <0.00%> (-1.95%) ⬇️
pkg/reconciler/configuration/configuration.go 84.61% <0.00%> (-1.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ca76bb...80051fe. Read the comment docs.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

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 merged commit b46576e into knative:main Feb 12, 2022
@dprotaso dprotaso deleted the serving-probe branch February 12, 2022 01:31
@dprotaso
Copy link
Member Author

/cherry-pick release-1.2
/cherry-pick release-1.1
/cherry-pick release-1.0

@knative-prow-robot
Copy link
Contributor

@dprotaso: #12617 failed to apply on top of branch "release-1.2":

Applying: Address 503s when the autoscaler is being rolled
Using index info to reconstruct a base tree...
M	config/core/deployments/activator.yaml
Falling back to patching base and 3-way merge...
Auto-merging config/core/deployments/activator.yaml
CONFLICT (content): Merge conflict in config/core/deployments/activator.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Address 503s when the autoscaler is being rolled
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.2
/cherry-pick release-1.1
/cherry-pick release-1.0

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.

@dprotaso
Copy link
Member Author

cherry pick is blocked on
#12620
#12618
#12619

@dprotaso
Copy link
Member Author

/cherry-pick release-1.2

@dprotaso
Copy link
Member Author

/cherry-pick release-1.1

@dprotaso
Copy link
Member Author

/cherry-pick release-1.0

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #12621

In response to this:

/cherry-pick release-1.2

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.

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #12622

In response to this:

/cherry-pick release-1.1

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.

@knative-prow-robot
Copy link
Contributor

@dprotaso: #12617 failed to apply on top of branch "release-1.0":

Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.0

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.

@dprotaso
Copy link
Member Author

/cherry-pick release-1.0

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #12623

In response to this:

/cherry-pick release-1.0

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.

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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flaky] test/upgrade.TestServingUpgrades/VerifyContinualTests/ProbeTest
3 participants