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 unterminating DataTemplate deletion #2007

Conversation

metal3-io-bot
Copy link
Contributor

This is an automated cherry-pick of #2000

/assign adilGhaffarDev

Some Metal3Data and Metal3DataTemplates were not destroyed
in rare circumstances due to missing reconcile events caused
by two distinct problems.

DataTemplate deletion has a watch over DataClaims but deletion
can only be performed when Data are completely removed (finalizer
executed) because Data resource requires the template.

We keep the facts that Data and DataClaims are still existing.
* When DataClaims exist, we do not remove the finalizer and wait
  for reconcile events from the watch.
* If we have neither DataClaims or Data, we can safely
  remove the finalizer. Deletion is complete.
* Otherwise we have to make a busy wait on Data deletion
  as there is no more claim to generate event but we still
  need to wait until the Data finalizers have been executed.

Actively wait for DataClaim deletion: If Metal3Data is deleted
before the Metal3DataClaim, we must actively wait for the claim
deletion, as no other reconciliation event will be triggered.

Fixes: metal3-io#1994
Co-authored-by: Pierre Crégut <pierre.cregut@orange.com>
Co-authored-by: Thomas Morin <thomas.morin@orange.com>
Signed-off-by: Pierre Crégut <pierre.cregut@orange.com>
@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 3, 2024
@adilGhaffarDev
Copy link
Member

/test metal3-centos-e2e-integration-test-release-1-8
/lgtm
/approve

@metal3-io-bot
Copy link
Contributor Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adilGhaffarDev

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

@metal3-io-bot metal3-io-bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 3, 2024
@adilGhaffarDev
Copy link
Member

/test metal3-centos-e2e-integration-test-release-1-8

@metal3-io-bot metal3-io-bot merged commit 8776a64 into metal3-io:release-1.8 Oct 4, 2024
14 checks passed
@tuminoid tuminoid changed the title [release-1.8] 🐛 Fix unterminating DataTemplate deletion 🐛 Fix unterminating DataTemplate deletion Oct 4, 2024
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants