Commit 065ffde
authored
fix: Avoid race when removing interfaces via NNCP (#2347)
* Avoid race when removing interfaces via NNCP
Remoivng an interface that was created using an NNCP, is done by editing the same
NNCP. This sometimes resulted in a race, in which the NNCP success status actually
presented the prvious status, leading to deleting the NNCP before the configuration
was completed, leaving hanging interfaces in the cluster nodes, with
node native interfaces occupied as the ports of these tests-created interfaces.
A recent PR made this failed flow to always occur.
This PR aims to assure that the timestamp of the AVAIALBLE status is updated for
the recent change (the interface removal) and not the previous change (setup or
modification).
This PR is based on the fix that was presented in
RedHatQE/openshift-virtualization-tests#430.
* Store fixed initial time outside loop
* Handle CR comments
* More CR fixes
Verify orderly teardown of a failed NNCP.
* More CR fixes
Remove redundant overriding update().
* Fix CI failure
Add datetime to flake8.
* Fix more CR comments
Clarify comment
Rename args for clarification
Add typing for new functions
* Fix CI failure
* Add clarifying comment
* Apply code-reabbit suggestions
* Fix comments1 parent 2e22b1b commit 065ffde
2 files changed
+37
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
325 | 329 | | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
329 | 363 | | |
330 | 364 | | |
331 | 365 | | |
| |||
0 commit comments