Commit 1d27a91
committed
fix(applycheck): drop false-positive blockers on virtual-link names
BondConfig.name, VLANConfig.name, and BridgeConfig.name describe
*virtual links being created* by the apply, not references to
existing links. The walker emitted them as Phase 1 link refs anyway,
so every legitimate 'add a new bond / vlan / bridge to a node'
apply tripped its own pre-flight gate with a 'declared link
bond99 not found' blocker on the doc that was supposed to create
bond99 in the first place. Operators would have had to pass
--skip-resource-validation on every such apply, defeating the gate.
New contract per kind:
- LinkConfig.name -> emitted (override case dominates; the operator
is usually tweaking ens5 / eth0 settings on a NIC that already
exists, and a typo here is the most common Phase-1 catch).
- VLANConfig.link -> emitted (parent must exist), .name skipped.
- BondConfig.links[] -> emitted (slaves must exist), .name skipped.
- BridgeConfig.ports[] -> emitted (ports must exist), .name skipped.
Pinned with explicit assertion: VLANConfig.name (eth0.4000 in the
fixture) MUST NOT surface as a ref. Verified on dev17 OCI cluster:
adding 'BondConfig{name: bond99, links: [ghost0, ens5]}' now blocks
only on ghost0 (the bad slave), not on bond99 (the new bond being
created).
Refs: #172
Signed-off-by: Aleksei Sviridkin <f@lex.la>1 parent 491c6f7 commit 1d27a91
2 files changed
Lines changed: 42 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
| |||
189 | 196 | | |
190 | 197 | | |
191 | 198 | | |
192 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
193 | 204 | | |
194 | | - | |
195 | | - | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
199 | 208 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
205 | 216 | | |
206 | 217 | | |
207 | | - | |
| 218 | + | |
208 | 219 | | |
209 | 220 | | |
210 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
134 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
135 | 153 | | |
136 | 154 | | |
137 | 155 | | |
| |||
0 commit comments