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 PodTemplate validation #60683

Merged

Conversation

nilebox
Copy link

@nilebox nilebox commented Mar 2, 2018

What this PR does / why we need it:
This is a bugfix for pod template validation, which can be reproduced by deleting with "foreground deletion" mode (DeleteOptions.PropagationPolicy = metav1.DeletePropagationForeground).
Because of this bug GC will never delete a pod template with foregroundDeletion finalizer.

Special notes for your reviewer:
The issue was originally found and confirmed in the PR #59851, where switching to foreground deletion in kubectl broke a unit test revealing this bug.
Extracted for easier backporting to releases as suggested in #59851 (comment)

/cc @liggitt @caesarxuchao
/sig api-machinery

fixed foreground deletion of podtemplates

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 2, 2018
@nilebox
Copy link
Author

nilebox commented Mar 2, 2018

/assign @liggitt
/assign @caesarxuchao

@liggitt
Copy link
Member

liggitt commented Mar 2, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. 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 Mar 2, 2018
@liggitt liggitt added this to the v1.9 milestone Mar 2, 2018
@liggitt liggitt added cherrypick-candidate kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed milestone/incomplete-labels labels Mar 2, 2018
@liggitt
Copy link
Member

liggitt commented Mar 2, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2018
@liggitt
Copy link
Member

liggitt commented Mar 2, 2018

/status approved-for-milestone

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Mar 2, 2018
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@caesarxuchao @liggitt @nilebox

Pull Request Labels
  • sig/api-machinery: Pull Request will be escalated to these SIGs if needed.
  • priority/critical-urgent: Never automatically move pull request out of a release milestone; continually escalate to contributor and SIG through all available channels.
  • kind/bug: Fixes a bug discovered during the current release.
Help

@nilebox
Copy link
Author

nilebox commented Mar 2, 2018

/test pull-kubernetes-e2e-gce

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@nilebox
Copy link
Author

nilebox commented Mar 2, 2018

/test pull-kubernetes-e2e-gce

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@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 comment for consistent failures.

@nilebox
Copy link
Author

nilebox commented Mar 2, 2018

@liggitt All checks passed, ready to merge.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 60683, 60386). If you want to cherry-pick this change to another branch, please follow the instructions here.

@liggitt
Copy link
Member

liggitt commented Mar 2, 2018

opened cherry picks

@nilebox nilebox deleted the pod-template-validation-fix branch March 2, 2018 14:24
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 2, 2018
k8s-github-robot pushed a commit that referenced this pull request Mar 14, 2018
…3-upstream-release-1.9

Automatic merge from submit-queue.

Automated cherry pick of #60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method

Cherry pick of #60683 on release-1.9.

#60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method


```release-note
fixed foreground deletion of podtemplates
```
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.9" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

k8s-github-robot pushed a commit that referenced this pull request Mar 16, 2018
…3-upstream-release-1.7

Automatic merge from submit-queue.

Automated cherry pick of #60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method

Cherry pick of #60683 on release-1.7.

#60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method


```release-note
fixed foreground deletion of podtemplates
```
k8s-github-robot pushed a commit that referenced this pull request Mar 31, 2018
…3-upstream-release-1.8

Automatic merge from submit-queue.

Automated cherry pick of #60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method

Cherry pick of #60683 on release-1.8.

#60683: Bugfix: Fix ordering of ValidateObjectMetaUpdate method


```release-note
fixed foreground deletion of podtemplates
```
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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/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.

7 participants