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

explain why finalizers are not processed in order #83110

Merged
merged 2 commits into from
Oct 1, 2019

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Sep 25, 2019

This came up in slack and appeared frequent enough to deserve a note for future us.

@kubernetes/sig-api-machinery-misc

NONE

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 25, 2019
@k8s-ci-robot k8s-ci-robot added area/code-generation kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 25, 2019
// Finalizers may be processed and removed in any order. Order is NOT enforced
// because it introduces significant risk of stuck finalizers.
// finalizers is a shared field, any actor with permission can reorder it.
// If the finalizer list is processed in order, then this can deadlock finalizers.
Copy link
Member

Choose a reason for hiding this comment

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

"then this can deadlock finalizers" makes it sound like a bug in the API server. Maybe rephrase like "this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a condition produced by a component responsible for a finalizer later in the list, resulting in a deadlock."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@fejta-bot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 25, 2019
@liggitt
Copy link
Member

liggitt commented Sep 25, 2019

/priority backlog
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Sep 25, 2019
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, 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 Sep 25, 2019
// Finalizers may be processed and removed in any order. Order is NOT enforced
// because it introduces significant risk of stuck finalizers.
// finalizers is a shared field, any actor with permission can reorder it.
// If the finalizer list is processed in order, then this can lead to a situation
Copy link
Contributor

Choose a reason for hiding this comment

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

Carrying on from the previous sentence, consider starting this one to clarify:

Since the finalizer order is difficult to coordinate, processing the finalizer list in order could lead to a situation in which the component responsible for the first finalizer in the list would be waiting for a signal (such as a particular field value to change or an external system to perform some operation) produced by a component responsible for a finalizer later in the list, resulting in a deadlock.

@liggitt
Copy link
Member

liggitt commented Sep 25, 2019

verify shows generated file updates are required

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

2 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@yliaog
Copy link
Contributor

yliaog commented Sep 26, 2019

/cc

@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
@kubernetes kubernetes deleted a comment from fejta-bot Oct 1, 2019
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/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. 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.

None yet

6 participants