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

switch delete strategy to background deletion #65908

Conversation

@juanvallejo
Copy link
Member

commented Jul 6, 2018

Release note:

"kubectl delete" no longer waits for dependent objects to be deleted when removing parent resources

Before 1.11.0

  • Resources that had client-side reapers in older versions of the client had all of their dependents deleted first. The parent resource itself was deleted last. This allowed the command to be re-entrant and was largely an artifact of it having to be done that way by a client-side reaper.

After 1.11.0 (with this PR)

  • Resources that previously had client-side reapers are no longer deleted last (after their dependents). They are now instead deleted first. The garbage-collector server-side then deletes any dependents.
  • This means that the delete command can return, and the parent object can be deleted while child objects still exist.
    • This is okay because the child resources are eventually deleted by the garbage collector server-side.

cc @liggitt @soltysh

@k8s-ci-robot k8s-ci-robot requested review from adohe and dixudx Jul 6, 2018

@juanvallejo juanvallejo force-pushed the juanvallejo:jvallejo/switch-delete-strategy-background branch from 56c5667 to 9bcb4d8 Jul 6, 2018

@juanvallejo

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2018

/retest

@liggitt

This comment has been minimized.

Copy link
Member

commented Jul 6, 2018

the run_rs_tests failure seems likely to be related

@@ -138,8 +138,8 @@ func TestOrphanDependentsInDeleteObject(t *testing.T) {
}

// DeleteOptions.PropagationPolicy should be Foreground, when cascade is true (default).

This comment has been minimized.

Copy link
@liggitt

liggitt Jul 9, 2018

Member

comment is outdated

This comment has been minimized.

Copy link
@juanvallejo

juanvallejo Jul 9, 2018

Author Member

Thanks, comment updated

@juanvallejo juanvallejo force-pushed the juanvallejo:jvallejo/switch-delete-strategy-background branch from 9bcb4d8 to ebd48f2 Jul 9, 2018

@liggitt

This comment has been minimized.

Copy link
Member

commented Jul 10, 2018

/lgtm

this matches the default propagation mode for resource deletion for resources added since GC was introduced

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juanvallejo, 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

@liggitt

This comment has been minimized.

Copy link
Member

commented Jul 10, 2018

picked to 1.11 in #66024 to reduce blocking kubectl on background gc while still retaining the benefit of kubectl wait and delegating to server-side GC

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

[MILESTONENOTIFIER] Milestone Pull Request Labels Incomplete

@juanvallejo @liggitt

Action required: This pull request requires label changes. If the required changes are not made within 3 days, the pull request will be moved out of the v1.11 milestone.

kind: Must specify exactly one of kind/bug, kind/cleanup or kind/feature.
priority: Must specify exactly one of priority/critical-urgent, priority/important-longterm or priority/important-soon.
sig owner: Must specify at least one label prefixed with sig/.

Help
@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

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

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

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

@k8s-github-robot k8s-github-robot merged commit 0292137 into kubernetes:master Jul 10, 2018

9 of 17 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
pull-kubernetes-e2e-gce Job triggered.
Details
pull-kubernetes-e2e-gce-100-performance Job triggered.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job triggered.
Details
pull-kubernetes-e2e-kops-aws Job triggered.
Details
pull-kubernetes-integration Job triggered.
Details
pull-kubernetes-kubemark-e2e-gce-big Job triggered.
Details
pull-kubernetes-verify Job triggered.
Details
cla/linuxfoundation juanvallejo authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
k8s-github-robot pushed a commit that referenced this pull request Jul 11, 2018
Kubernetes Submit Queue
Merge pull request #66038 from liggitt/delete-rs-postcondition
Automatic merge from submit-queue (batch tested with PRs 66038, 65992, 66008). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

ensure rs pod cleanup happens

related to #65908

/assign juanvallejo

```release-note
NONE
```

@juanvallejo juanvallejo deleted the juanvallejo:jvallejo/switch-delete-strategy-background branch Jul 11, 2018

k8s-github-robot pushed a commit that referenced this pull request Jul 12, 2018
Kubernetes Submit Queue
Merge pull request #66024 from liggitt/automated-cherry-pick-of-#6590…
…8-upstream-release-1.11

Automatic merge from submit-queue.

Automated cherry pick of #65908: switch delete strategy to background deletion

Cherry pick of #65908 on release-1.11.

Fixes #66110

includes related test fix #66038

#65908: switch delete strategy to background deletion

```release-note
`kubectl delete` now deletes daemonset, deployment, statefulset, replicaset, replicationcontroller, and job objects immediately and delegates cleanup of child resources to server-side garbage collection in the background. This resolves hangs that could occur if garbage collection was not responsive when `kubectl delete` was invoked.
```
@marpaia

This comment has been minimized.

Copy link
Member

commented Jul 17, 2018

/sig cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.