Commit b5fcaf3
Routing-stack warm-reboot feature. (sonic-net#602)
* Routing-stack warm-reboot feature.
Please refer to the corresponding design document for more details: sonic-net/SONiC#239
The following manual UT plan has been successfully executed. UT automation pending.
Physical topology formed by various BGP peers connecting to the DUT. Both non-ecmp and ecmp prefixes are learned/tested.
Testcase Suite 1: Making use of “pkill -9 bgpd && pkill -9 zebra” as trigger.
=============
IPv4 prefixes
==========
* Restart zebra/bgpd:
- Verify that all prefixes are properly stale-marked and that no
change is pushed to AppDB during reconciliation.
- Result: PASSED
* Restart zebra/bgpd and add one new non-ecmp IPv4 prefix.
- To produce a route-state-inconsistency, add prefix in adjacent
node before bgp sessions are re-established.
- Verify that new-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and withdraw one non-ecmp IPv4 prefix.
- To produce a route-state-inconsistency, remove prefix in adjacent
node before bgp sessions are re-established.
- Verify that deleted-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and add one new path to an IPv4 ecmp-prefix.
- To produce a route-state-inconsistency, add prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that new prefix-path msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and withdraw one ecmp-path from an existing ecmp IPv4
prefix.
- To produce a route-state-inconsistency, remove prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that deleted-prefix-path msg is NOT pushed down to AppDB
till reconciliation takes place.
- Eventually, during reconciliation, this path will be eliminated
as it’s not being refreshed by remote-peer.
- Result: PASSED
IPv6 prefixes
==========
* Restart zebra/bgpd:
- Verify that all prefixes are properly stale-marked and that no
change is pushed to AppDB during reconciliation.
- Result: PASSED
* Restart zebra/bgpd and add one new non-ecmp IPv6 prefix.
- To produce a route-state-inconsistency, add prefix in adjacent
node before bgp sessions are re-established.
- Verify that new-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and withdraw one non-ecmp IPv6 prefix.
- To produce a route-state-inconsistency, remove prefix in adjacent
node before bgp sessions are re-established.
- Verify that deleted-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and add one new path to an IPv6 ecmp-prefix.
- To produce a route-state-inconsistency, add prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that new prefix-path msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart zebra/bgpd and withdraw one ecmp-path from an existing ecmp IPv6
prefix.
- To produce a route-state-inconsistency, remove prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that deleted-prefix-path msg is NOT pushed down to AppDB
till reconciliation takes place.
- Eventually, during reconciliation, this path will be eliminated
as it’s not being refreshed by remote-peer.
- Result: PASSED
Testcase Suite 2: Making use of sudo service bgp restart” as trigger.
=============
IPv4 prefixes
==========
* Restart bgp service/docker:
- Verify that all prefixes are properly stale-marked and that no
change is pushed to AppDB during reconciliation.
- Result: PASSED
* Restart bgp service/docker and add one new non-ecmp IPv4 prefix.
- To produce a route-state-inconsistency, add prefix in adjacent
node before bgp sessions are re-established.
- Verify that new-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and withdraw one non-ecmp IPv4 prefix.
- To produce a route-state-inconsistency, remove prefix in adjacent
node before bgp sessions are re-established.
- Verify that deleted-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and add one new path to an IPv4 ecmp-prefix.
- To produce a route-state-inconsistency, add prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that new prefix-path msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and withdraw one ecmp-path from an existing
ecmp IPv4 prefix.
- To produce a route-state-inconsistency, remove prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that deleted-prefix-path msg is NOT pushed down to AppDB
till reconciliation takes place.
- Eventually, during reconciliation, this path will be eliminated
as it’s not being refreshed by remote-peer.
- Result: PASSED
IPv6 prefixes
==========
* Restart bgp service/docker:
- Verify that all prefixes are properly stale-marked and that no
change is pushed to AppDB during reconciliation.
- Result: PASSED
* Restart bgp service/docker and add one new non-ecmp IPv6 prefix.
- To produce a route-state-inconsistency, add prefix in adjacent
node before bgp sessions are re-established.
- Verify that new-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and withdraw one non-ecmp IPv6 prefix.
- To produce a route-state-inconsistency, remove prefix in adjacent
node before bgp sessions are re-established.
- Verify that deleted-prefix msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and add one new path to an IPv6 ecmp-prefix.
- To produce a route-state-inconsistency, add prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that new prefix-path msg is NOT pushed down to AppDB till
reconciliation takes place.
- Result: PASSED
* Restart bgp service/docker and withdraw one ecmp-path from an existing
ecmp IPv6 prefix.
- To produce a route-state-inconsistency, remove prefix-path in
adjacent node before bgp sessions are re-established.
- Verify that deleted-prefix-path msg is NOT pushed down to AppDB
till reconciliation takes place.
- Eventually, during reconciliation, this path will be eliminated
as it’s not being refreshed by remote-peer.
- Result: PASSED
RB=
G=lnos-reviewers
R=pchaudhary,pmao,rmolina,samaity,sfardeen,zxu
A=
Signed-off-by: Rodny Molina <[email protected]>
* Renaming 'restoration' code and making minor adjustments to fpmsyncd
Signed-off-by: Rodny Molina <[email protected]>
* Eliminating 'state' associated to field-value-tuples
Code has been refactored to reduce the complexity associated to carrying 'state' for every received FV-tuple. Obviously, there's no free-lunch here, this is only possible at the expense of more memory utilization: we are now using two different buffers to store 'old' and 'new' state. Yet, this is a relatively-small price to pay for a much simpler implementation.
Signed-off-by: Rodny Molina <[email protected]>
* Adding UTs to cover routing-warm-reboot logic.
Signed-off-by: Rodny Molina <[email protected]>
* Fixing an issue with warm-reboot UTs that prevented an existing test-case from passing
As part of these changes i'm also modifying the ip-addresses of my UT setup to
avoid clashes with existing/previous testcases.
Signed-off-by: Rodny Molina <[email protected]>
* Making some small adjustments
* Addressing review comments for my UT code
* Addressing more review comments.
* Refactoring UTs to rely on pubsub notifications instead of logs1 parent aa07df1 commit b5fcaf3
8 files changed
Lines changed: 1290 additions & 24 deletions
File tree
- fpmsyncd
- tests
- warmrestart
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| |||
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
21 | | - | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
| 38 | + | |
27 | 39 | | |
28 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
33 | 75 | | |
34 | 76 | | |
35 | 77 | | |
36 | | - | |
| 78 | + | |
| 79 | + | |
37 | 80 | | |
38 | | - | |
39 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
40 | 101 | | |
41 | 102 | | |
42 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | | - | |
44 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
45 | 67 | | |
46 | 68 | | |
47 | 69 | | |
| |||
118 | 140 | | |
119 | 141 | | |
120 | 142 | | |
| 143 | + | |
121 | 144 | | |
122 | 145 | | |
123 | | - | |
124 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
125 | 168 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
293 | 313 | | |
294 | 314 | | |
295 | 315 | | |
| |||
334 | 354 | | |
335 | 355 | | |
336 | 356 | | |
337 | | - | |
| 357 | + | |
338 | 358 | | |
339 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
340 | 365 | | |
341 | 366 | | |
342 | 367 | | |
343 | | - | |
| 368 | + | |
344 | 369 | | |
345 | 370 | | |
346 | 371 | | |
| |||
375 | 400 | | |
376 | 401 | | |
377 | 402 | | |
378 | | - | |
| 403 | + | |
379 | 404 | | |
380 | 405 | | |
381 | 406 | | |
382 | 407 | | |
| 408 | + | |
383 | 409 | | |
384 | 410 | | |
385 | 411 | | |
386 | 412 | | |
387 | 413 | | |
388 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
389 | 424 | | |
390 | 425 | | |
391 | 426 | | |
392 | 427 | | |
| 428 | + | |
393 | 429 | | |
| 430 | + | |
394 | 431 | | |
395 | | - | |
| 432 | + | |
| 433 | + | |
396 | 434 | | |
397 | | - | |
| 435 | + | |
| 436 | + | |
398 | 437 | | |
399 | 438 | | |
400 | 439 | | |
| |||
424 | 463 | | |
425 | 464 | | |
426 | 465 | | |
427 | | - | |
| 466 | + | |
| 467 | + | |
428 | 468 | | |
429 | 469 | | |
430 | 470 | | |
| |||
0 commit comments