mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-03 18:47:04 +09:00
[Backport release-1.5] fix(kamaji): backport datastore unused-deletion deadlock fix (clastix/kamaji#1122) (#3187)
# Description Backport of #3146 to `release-1.5`.
This commit is contained in:
1 file changed
+12
@@ -0,0 +1,12 @@
|
||||
diff --git a/controllers/datastore_controller.go b/controllers/datastore_controller.go
|
||||
--- a/controllers/datastore_controller.go
|
||||
+++ b/controllers/datastore_controller.go
|
||||
@@ -151,7 +151,7 @@ func (r *DataStore) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
- if meta.IsStatusConditionFalse(ds.Status.Conditions, kamajiv1alpha1.DataStoreConditionAllowedDeletionType) {
|
||||
+ if meta.IsStatusConditionFalse(ds.Status.Conditions, kamajiv1alpha1.DataStoreConditionAllowedDeletionType) || len(tcpList.Items) == 0 {
|
||||
logger.Info("DataStore is not used by any TenantControlPlane object")
|
||||
|
||||
meta.SetStatusCondition(&ds.Status.Conditions, metav1.Condition{
|
||||
Reference in new issue
Block a user