Commit f786a36
[cleanup_openstack] Fix namespace stuck on cleanup by separating deletion phases
Split CRs deletion into two phases to prevent namespace getting stuck
during cleanup:
- Phase 1: Delete application resources (DataPlane, ControlPlane, BMH, etc.)
- Phase 2: Delete operators (NMState, MetalLB, OpenStack operators, OLM)
- Wait between phases to ensure Phase 1 resources are fully deleted
Each resource type (DataPlaneDeployment, DataPlaneNodeSet, ControlPlane,
RabbitmqCluster) is waited on individually in dependency order. If a
resource gets stuck, its finalizers are force-removed before moving to
the next type. This replaces the previous RabbitmqCluster-specific
workaround with a generic mechanism.
This prevents race condition where operator controller is deleted before
it can process finalizers from application resources, which causes the
namespace to hang indefinitely.
Signed-off-by: Miguel Angel Nieto Jimenez <mnietoji@redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 07ed6cb commit f786a36
2 files changed
Lines changed: 62 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 54 | + | |
82 | 55 | | |
83 | 56 | | |
84 | 57 | | |
| |||
99 | 72 | | |
100 | 73 | | |
101 | 74 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 75 | | |
108 | 76 | | |
109 | 77 | | |
| |||
121 | 89 | | |
122 | 90 | | |
123 | 91 | | |
124 | | - | |
125 | | - | |
| 92 | + | |
126 | 93 | | |
127 | 94 | | |
128 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
129 | 123 | | |
130 | 124 | | |
131 | 125 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments