Commit 83d2813
committed
(bug) Fix Helm conflict race when chart ownership transfers between ClusterSummaries
When a new ClusterSummary (B) is created before an existing one (A) is deleted,
and both reference the same Helm chart, B may receive a NonRetriableError for chart
ownership conflict while A is still being withdrawn.
The existing recovery path handles the normal case correctly: when A is deleted, it
unregisters from the chart manager and requeues all conflicting ClusterSummaries so
they retry.
The race occurs when B's deploy worker is still running at that moment. IsInProgress(B)
returns true, the requeue is skipped, and nobody notifies B once A is gone and B has
become the rightful owner.
B's deploy worker eventually finishes and stores the NonRetriableError. When B's reconciler
reads it, the conflict is already resolved, A has been removed from the chart manager and B
now owns the chart. Without this fix, B is permanently marked FailedNonRetriable and
never retried, since NonRetriableError intentionally suppresses further reconciliation.
The fix detects this at the moment B processes the stale result: if all charts that were in
conflict can now be managed by B, the error is treated as resolved, status is reset to Provisioning,
and a requeue is returned. The next reconciliation cycle submits a fresh deploy.1 parent 7d9f9bf commit 83d2813
1 file changed
Lines changed: 55 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
| |||
873 | 887 | | |
874 | 888 | | |
875 | 889 | | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
876 | 928 | | |
877 | 929 | | |
878 | 930 | | |
| |||
0 commit comments