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

cp4d-delete-instance.sh: Delete Finalizer on Instance After 5 Minutes of Waiting #807

Open
luigimolinaro opened this issue Oct 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@luigimolinaro
Copy link
Contributor

Problem Description:
When deleting a namespace, the system may hang indefinitely due to finalizers not being removed automatically, even when all content is successfully deleted. This leads to namespaces being stuck in a terminating state. The Kubernetes/Oc API often shows the following message indicating that finalization is pending:

{
    "type": "NamespaceDeletionContentFailure",
    "status": "False",
    "lastTransitionTime": "2024-10-15T09:08:43Z",
    "reason": "ContentDeleted",
    "message": "All content successfully deleted, may be waiting on finalization"
}

Proposed Solution:
Implement an automatic deletion of the finalizer after a 5-minute timeout if the system is waiting on finalization after content has been confirmed as deleted.

Desired Outcome:

  • After a 5-minute timeout, if the deletion process is waiting on finalization and all content has been deleted, the finalizer should be automatically removed to allow the namespace deletion to proceed.
  • This prevents namespaces from being stuck in a terminating state and enhances system responsiveness.

Key Details for Implementation:

  1. Timeout Logic:

    • After detecting the status "reason": "ContentDeleted", start a 5-minute countdown.
    • If the finalizer is still present after the 5 minutes, proceed with its deletion.
  2. Safety and Error Handling:

    • Ensure that all necessary resources have been properly deleted before finalizer removal.
    • Provide logging and auditing for finalizer removal, ensuring it is traceable in case of issues.
  3. Custom Resource Definition (CRD) Updates:

    • Modify the current instance handling to include a finalizer removal mechanism after the timeout.
  4. Configuration Options:

    • Provide an option to disable automatic finalizer removal if stricter control is needed.

Expected Impact:

  • Reduced number of namespaces stuck in terminating states.
@luigimolinaro luigimolinaro added the enhancement New feature or request label Oct 15, 2024
@luigimolinaro luigimolinaro self-assigned this Oct 15, 2024
@luigimolinaro luigimolinaro changed the title cp4d-delete-instance.s : Delete Finalizer on Instance After 5 Minutes of Waiting cp4d-delete-instance.sh: Delete Finalizer on Instance After 5 Minutes of Waiting Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant