hierarchical-namespaces icon indicating copy to clipboard operation
hierarchical-namespaces copied to clipboard

Proposal: remove anchor finalizers as soon as subns starts getting deleted

Open adrianludwin opened this issue 2 years ago • 2 comments

Today, if you delete a subnamespace anchor, the anchor is not fully deleted until the underlying subnamespace is deleted. Namespaces are usually deleted within several seconds, but can sometimes get "stuck," in which case the anchor isn't deleted either.

This behaviour has two problems:

  • If the anchor isn't deleted, it can prevent the parent namespace from being deleted, since namespaces cannot be deleted until all the objects in them have also been deleted.
  • The code used to implement this behaviour in HNC is quite complicated, and changing it may introduce subtle bugs.

As a result, we're proposing a simplification: HNC will let the anchor be deleted as soon as it starts deleting the subnamespace. This means that the anchor will typically vanish virtually "instantly" - that is, typically less than a second after you say kubectl delete subns <foo>. The subnamespace itself will be put into the "deleting" state and will be removed whenever Kubernetes is able to do so.

If you've never checked to see if an anchor has actually been deleted before, this change won't affect you. Otherwise, you need to be aware that simply because the anchor has disappeared, there's a chance that the underlying namespace could still be there, either because it's still being deleted, or because it's gotten stuck somehow.

adrianludwin avatar Apr 19 '22 14:04 adrianludwin

/assign @erikgb

adrianludwin avatar Apr 19 '22 14:04 adrianludwin

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 18 '22 15:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Aug 17 '22 16:08 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Sep 16 '22 16:09 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

k8s-ci-robot avatar Sep 16 '22 16:09 k8s-ci-robot