Commit a917bdb
fix for 1.10->1.11 upgrade issue
This commit:
- Implements a fallback Metal3Data retrieval process as part of the
Metal3DataTemplate controller's Metal3DataClaim and Metal3Data deletion
process
-- The new process allows the controller to retrieve the Metal3Data based
on the Metal3DataClaim's render information that supposed to point
directly to the Metal3Data
- Adds related unit test
- Extends the existing "UpdateDatas" unit test table evaluation process
to take into consideration that when a claim is deleted the related
data has to be deleted too
Original issue:
If the templateReference was used before upgrade to 1.11 and Metal3Data was
generated based on the `templateReference name + Metal3DataClaim index`
instead of the `template name + data claim index` then after the upgrade during
the first new KCP or Metal3MachineDeployment rollout CAPM3 was unable to find
the old Metal3Data because after upgrade to 1.11 CAPM3 was only looking
for the Metal3Data based on `template name + data claim index` only while old
Metal3Data was named based on `templateReference + index`.
In CAPM3 technically Metal3Data is allowed to get orphaned in case
CAPM3 can't find them based on the information in the Metal3DataClaim and
the related Metal3DataTemplate so the Metal3Data with names based on the
deprecated templateRefference got orphaned and then they were holding onto
IPClaims.
The presence of the orphaned Metal3Data in environments where IP
pre-allocation was used resulted in the old Metal3Data holding onto the pre
allocated IP claims thus the during the rollout the newly created Machies got
stuck as they were unable to re-claim the IPs.
Signed-off-by: Adam Rozman <[email protected]>1 parent 5e7b7ec commit a917bdb
File tree
3 files changed
+192
-41
lines changed- baremetal
3 files changed
+192
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
170 | | - | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
| |||
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
182 | | - | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
215 | | - | |
| 222 | + | |
| 223 | + | |
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
| |||
341 | 349 | | |
342 | 350 | | |
343 | 351 | | |
344 | | - | |
345 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
346 | 380 | | |
347 | 381 | | |
348 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
349 | 387 | | |
350 | 388 | | |
| 389 | + | |
351 | 390 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
357 | 408 | | |
358 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
359 | 416 | | |
360 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
361 | 425 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
378 | 433 | | |
379 | 434 | | |
380 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
273 | | - | |
274 | | - | |
| 271 | + | |
| 272 | + | |
275 | 273 | | |
276 | | - | |
| 274 | + | |
277 | 275 | | |
278 | 276 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
286 | 307 | | |
287 | 308 | | |
288 | 309 | | |
| |||
321 | 342 | | |
322 | 343 | | |
323 | 344 | | |
324 | | - | |
| 345 | + | |
325 | 346 | | |
326 | 347 | | |
327 | 348 | | |
| |||
339 | 360 | | |
340 | 361 | | |
341 | 362 | | |
342 | | - | |
| 363 | + | |
343 | 364 | | |
344 | 365 | | |
345 | 366 | | |
| |||
364 | 385 | | |
365 | 386 | | |
366 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
367 | 408 | | |
368 | 409 | | |
369 | 410 | | |
| |||
402 | 443 | | |
403 | 444 | | |
404 | 445 | | |
405 | | - | |
| 446 | + | |
406 | 447 | | |
407 | 448 | | |
408 | 449 | | |
| |||
417 | 458 | | |
418 | 459 | | |
419 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
420 | 478 | | |
421 | 479 | | |
422 | 480 | | |
| |||
598 | 656 | | |
599 | 657 | | |
600 | 658 | | |
601 | | - | |
| 659 | + | |
602 | 660 | | |
603 | 661 | | |
604 | 662 | | |
| |||
681 | 739 | | |
682 | 740 | | |
683 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
684 | 778 | | |
685 | 779 | | |
686 | 780 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
| 1773 | + | |
1773 | 1774 | | |
1774 | 1775 | | |
1775 | 1776 | | |
| 1777 | + | |
1776 | 1778 | | |
1777 | 1779 | | |
1778 | 1780 | | |
| |||
1782 | 1784 | | |
1783 | 1785 | | |
1784 | 1786 | | |
1785 | | - | |
| 1787 | + | |
1786 | 1788 | | |
1787 | 1789 | | |
1788 | 1790 | | |
| |||
0 commit comments