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

fix double lock and excercise its codepath in tests #114459

Conversation

alexzielenski
Copy link
Contributor

@alexzielenski alexzielenski commented Dec 13, 2022

/kind bug

What this PR does / why we need it:

This removes a duplicate lock on the 304 Not Modified codepath likely forgotten to be removed during a refactor.

It is probable that no users have discovered this bug, as it occurs only if the user has an aggregated APIService which makes use of aggregated discovery, which was just released a few days ago.

Also includes a reproducer unit test which fails easily without the change, and is now fixed.

More information in #114442

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fixes a 1.26 regression in the alpha Aggregated Discovery feature that can cause a stuck apiserver if an aggregated apiservice returned 304 Not Modified for aggregated discovery information

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 13, 2022
@alexzielenski
Copy link
Contributor Author

/sig api-machinery
/triage accepted
/assign @apelisse

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 13, 2022
@alexzielenski
Copy link
Contributor Author

/retest

@liggitt
Copy link
Member

liggitt commented Dec 13, 2022

looks like github is making prow unhappy:

I1213 17:22:14.782] Call: git fetch --quiet --tags https://github.com/kubernetes/kubernetes master +refs/pull/114459/head:refs/pr/114459
W1213 17:22:15.487] fatal: Couldn't find remote ref refs/pull/114459/head

/retest

@liggitt
Copy link
Member

liggitt commented Dec 13, 2022

/lgtm
/approve

go ahead and open the cherry-pick to release-1.26

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexzielenski, liggitt

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2022
would cause a deadlock if an aggregated apiserver decided to respect ETags for its aggregated discovery document,
@alexzielenski alexzielenski force-pushed the apiserver/discovery/aggregator-deadlock branch from 09fdda6 to 7510afb Compare December 13, 2022 18:01
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2022
@alexzielenski
Copy link
Contributor Author

/retest

@apelisse
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2022
@k8s-ci-robot k8s-ci-robot merged commit 25efa77 into kubernetes:master Dec 13, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Dec 13, 2022
k8s-ci-robot added a commit that referenced this pull request Dec 14, 2022
…f-#114459-upstream-release-1.26

Automated cherry pick of #114459: fix double lock and excercise its codepath in tests
@liggitt liggitt added the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Jan 30, 2023
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants