Skip to content

Commit 3fa098b

Browse files
committed
[BGP] Adapt NNCP routes to new nmstate version
PR [1] was included in nmstate-2.2.50-1, detecting and rejecting multiple routes to a common destination with the following error: ``` InvalidArgument: Route to XXX has conflicting nexthop (AAA; BBB). Either set the existing route to 'absent', or set their 'weight' (for ECMP) or 'metric' value ``` Adding weights to those routes avoids this error. [1] nmstate/nmstate#2935
1 parent a9b5c75 commit 3fa098b

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

examples/dt/bgp-l3-xl/control-plane/networking/nncp/values.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ data:
2727
- destination: 99.99.0.0/16
2828
next-hop-address: 100.64.0.13
2929
next-hop-interface: enp8s0
30+
weight: 200
3031
- destination: 99.99.0.0/16
3132
next-hop-address: 100.65.0.13
3233
next-hop-interface: enp9s0
34+
weight: 200
3335
node_4:
3436
name: worker-1
3537
internalapi_ip: 172.17.0.6
@@ -49,9 +51,11 @@ data:
4951
- destination: 99.99.0.0/16
5052
next-hop-address: 100.64.0.17
5153
next-hop-interface: enp8s0
54+
weight: 200
5255
- destination: 99.99.0.0/16
5356
next-hop-address: 100.65.0.17
5457
next-hop-interface: enp9s0
58+
weight: 200
5559
node_5:
5660
name: worker-2
5761
internalapi_ip: 172.17.0.7
@@ -71,9 +75,11 @@ data:
7175
- destination: 99.99.0.0/16
7276
next-hop-address: 100.64.0.25
7377
next-hop-interface: enp8s0
78+
weight: 200
7479
- destination: 99.99.0.0/16
7580
next-hop-address: 100.65.0.21
7681
next-hop-interface: enp9s0
82+
weight: 200
7783
node_6:
7884
name: worker-3
7985
internalapi_ip: 172.17.0.8
@@ -93,9 +99,11 @@ data:
9399
- destination: 99.99.0.0/16
94100
next-hop-address: 100.64.1.13
95101
next-hop-interface: enp8s0
102+
weight: 200
96103
- destination: 99.99.0.0/16
97104
next-hop-address: 100.65.1.13
98105
next-hop-interface: enp9s0
106+
weight: 200
99107

100108
node_7:
101109
name: worker-4
@@ -116,9 +124,11 @@ data:
116124
- destination: 99.99.0.0/16
117125
next-hop-address: 100.64.1.17
118126
next-hop-interface: enp8s0
127+
weight: 200
119128
- destination: 99.99.0.0/16
120129
next-hop-address: 100.65.1.17
121130
next-hop-interface: enp9s0
131+
weight: 200
122132
node_8:
123133
name: worker-5
124134
internalapi_ip: 172.17.0.10
@@ -138,9 +148,11 @@ data:
138148
- destination: 99.99.0.0/16
139149
next-hop-address: 100.64.1.21
140150
next-hop-interface: enp8s0
151+
weight: 200
141152
- destination: 99.99.0.0/16
142153
next-hop-address: 100.65.1.21
143154
next-hop-interface: enp9s0
155+
weight: 200
144156
node_9:
145157
name: worker-6
146158
internalapi_ip: 172.17.0.11
@@ -160,9 +172,11 @@ data:
160172
- destination: 99.99.0.0/16
161173
next-hop-address: 100.64.2.13
162174
next-hop-interface: enp8s0
175+
weight: 200
163176
- destination: 99.99.0.0/16
164177
next-hop-address: 100.65.2.13
165178
next-hop-interface: enp9s0
179+
weight: 200
166180
node_10:
167181
name: worker-7
168182
internalapi_ip: 172.17.0.12
@@ -182,9 +196,11 @@ data:
182196
- destination: 99.99.0.0/16
183197
next-hop-address: 100.64.2.17
184198
next-hop-interface: enp8s0
199+
weight: 200
185200
- destination: 99.99.0.0/16
186201
next-hop-address: 100.65.2.17
187202
next-hop-interface: enp9s0
203+
weight: 200
188204
node_11:
189205
name: worker-8
190206
internalapi_ip: 172.17.0.13
@@ -204,9 +220,11 @@ data:
204220
- destination: 99.99.0.0/16
205221
next-hop-address: 100.64.2.21
206222
next-hop-interface: enp8s0
223+
weight: 200
207224
- destination: 99.99.0.0/16
208225
next-hop-address: 100.65.2.21
209226
next-hop-interface: enp9s0
227+
weight: 200
210228
# test worker
211229
node_12:
212230
name: worker-9
@@ -556,9 +574,11 @@ data:
556574
- destination: 99.99.0.0/16
557575
next-hop-address: 100.64.0.13
558576
next-hop-interface: enp8s0
577+
weight: 200
559578
- destination: 99.99.0.0/16
560579
next-hop-address: 100.65.0.13
561580
next-hop-interface: enp9s0
581+
weight: 200
562582
node4:
563583
bgpnet0:
564584
bgp_peer: 100.64.0.17
@@ -573,9 +593,11 @@ data:
573593
- destination: 99.99.0.0/16
574594
next-hop-address: 100.64.0.17
575595
next-hop-interface: enp8s0
596+
weight: 200
576597
- destination: 99.99.0.0/16
577598
next-hop-address: 100.65.0.17
578599
next-hop-interface: enp9s0
600+
weight: 200
579601
node5:
580602
bgpnet0:
581603
bgp_peer: 100.64.0.21
@@ -590,9 +612,11 @@ data:
590612
- destination: 99.99.0.0/16
591613
next-hop-address: 100.64.0.21
592614
next-hop-interface: enp8s0
615+
weight: 200
593616
- destination: 99.99.0.0/16
594617
next-hop-address: 100.65.0.21
595618
next-hop-interface: enp9s0
619+
weight: 200
596620
node6:
597621
bgpnet0:
598622
bgp_peer: 100.64.1.13
@@ -607,9 +631,11 @@ data:
607631
- destination: 99.99.0.0/16
608632
next-hop-address: 100.64.1.13
609633
next-hop-interface: enp8s0
634+
weight: 200
610635
- destination: 99.99.0.0/16
611636
next-hop-address: 100.65.1.13
612637
next-hop-interface: enp9s0
638+
weight: 200
613639
node7:
614640
bgpnet0:
615641
bgp_peer: 100.64.1.17
@@ -624,9 +650,11 @@ data:
624650
- destination: 99.99.0.0/16
625651
next-hop-address: 100.64.1.17
626652
next-hop-interface: enp8s0
653+
weight: 200
627654
- destination: 99.99.0.0/16
628655
next-hop-address: 100.65.1.17
629656
next-hop-interface: enp9s0
657+
weight: 200
630658
node8:
631659
bgpnet0:
632660
bgp_peer: 100.64.1.21
@@ -641,9 +669,11 @@ data:
641669
- destination: 99.99.0.0/16
642670
next-hop-address: 100.64.1.21
643671
next-hop-interface: enp8s0
672+
weight: 200
644673
- destination: 99.99.0.0/16
645674
next-hop-address: 100.65.1.21
646675
next-hop-interface: enp9s0
676+
weight: 200
647677
node9:
648678
bgpnet0:
649679
bgp_peer: 100.64.2.13
@@ -658,9 +688,11 @@ data:
658688
- destination: 99.99.0.0/16
659689
next-hop-address: 100.64.2.13
660690
next-hop-interface: enp8s0
691+
weight: 200
661692
- destination: 99.99.0.0/16
662693
next-hop-address: 100.65.2.13
663694
next-hop-interface: enp9s0
695+
weight: 200
664696
node10:
665697
bgpnet0:
666698
bgp_peer: 100.64.2.17
@@ -675,9 +707,11 @@ data:
675707
- destination: 99.99.0.0/16
676708
next-hop-address: 100.64.2.17
677709
next-hop-interface: enp8s0
710+
weight: 200
678711
- destination: 99.99.0.0/16
679712
next-hop-address: 100.65.2.17
680713
next-hop-interface: enp9s0
714+
weight: 200
681715
node11:
682716
bgpnet0:
683717
bgp_peer: 100.64.2.21
@@ -692,9 +726,11 @@ data:
692726
- destination: 99.99.0.0/16
693727
next-hop-address: 100.64.2.21
694728
next-hop-interface: enp8s0
729+
weight: 200
695730
- destination: 99.99.0.0/16
696731
next-hop-address: 100.65.2.21
697732
next-hop-interface: enp9s0
733+
weight: 200
698734
node12:
699735
bgpnet0:
700736
bgp_peer: 100.64.10.1

examples/dt/bgp_dt01/control-plane/networking/nncp/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,20 @@ data:
2727
- destination: 99.99.0.0/16
2828
next-hop-address: 100.64.0.9
2929
next-hop-interface: enp7s0
30+
weight: 200
3031
- destination: 99.99.0.0/16
3132
next-hop-address: 100.65.0.9
3233
next-hop-interface: enp8s0
34+
weight: 200
3335
# routes to octavia mgmt network
3436
- destination: 172.24.0.0/16
3537
next-hop-address: 100.64.0.9
3638
next-hop-interface: enp7s0
39+
weight: 200
3740
- destination: 172.24.0.0/16
3841
next-hop-address: 100.65.0.9
3942
next-hop-interface: enp8s0
43+
weight: 200
4044
node_4:
4145
name: worker-1
4246
internalapi_ip: 172.17.0.6
@@ -56,16 +60,20 @@ data:
5660
- destination: 99.99.0.0/16
5761
next-hop-address: 100.64.1.9
5862
next-hop-interface: enp7s0
63+
weight: 200
5964
- destination: 99.99.0.0/16
6065
next-hop-address: 100.65.1.9
6166
next-hop-interface: enp8s0
67+
weight: 200
6268
# routes to octavia mgmt network
6369
- destination: 172.24.0.0/16
6470
next-hop-address: 100.64.1.9
6571
next-hop-interface: enp7s0
72+
weight: 200
6673
- destination: 172.24.0.0/16
6774
next-hop-address: 100.65.1.9
6875
next-hop-interface: enp8s0
76+
weight: 200
6977
node_5:
7078
name: worker-2
7179
internalapi_ip: 172.17.0.7
@@ -85,16 +93,20 @@ data:
8593
- destination: 99.99.0.0/16
8694
next-hop-address: 100.64.2.9
8795
next-hop-interface: enp7s0
96+
weight: 200
8897
- destination: 99.99.0.0/16
8998
next-hop-address: 100.65.2.9
9099
next-hop-interface: enp8s0
100+
weight: 200
91101
# routes to octavia mgmt network
92102
- destination: 172.24.0.0/16
93103
next-hop-address: 100.64.2.9
94104
next-hop-interface: enp7s0
105+
weight: 200
95106
- destination: 172.24.0.0/16
96107
next-hop-address: 100.65.2.9
97108
next-hop-interface: enp8s0
109+
weight: 200
98110
node_6:
99111
name: worker-3
100112
internalapi_ip: 172.17.0.8
@@ -460,16 +472,20 @@ data:
460472
- destination: 99.99.0.0/16
461473
next-hop-address: 100.64.0.9
462474
next-hop-interface: enp7s0
475+
weight: 200
463476
- destination: 99.99.0.0/16
464477
next-hop-address: 100.65.0.9
465478
next-hop-interface: enp8s0
479+
weight: 200
466480
# routes to octavia mgmt network
467481
- destination: 172.24.0.0/16
468482
next-hop-address: 100.64.0.9
469483
next-hop-interface: enp7s0
484+
weight: 200
470485
- destination: 172.24.0.0/16
471486
next-hop-address: 100.65.0.9
472487
next-hop-interface: enp8s0
488+
weight: 200
473489
node4:
474490
bgpnet0:
475491
bgp_peer: 100.64.1.9
@@ -482,16 +498,20 @@ data:
482498
- destination: 99.99.0.0/16
483499
next-hop-address: 100.64.1.9
484500
next-hop-interface: enp7s0
501+
weight: 200
485502
- destination: 99.99.0.0/16
486503
next-hop-address: 100.65.1.9
487504
next-hop-interface: enp8s0
505+
weight: 200
488506
# routes to octavia mgmt network
489507
- destination: 172.24.0.0/16
490508
next-hop-address: 100.64.1.9
491509
next-hop-interface: enp7s0
510+
weight: 200
492511
- destination: 172.24.0.0/16
493512
next-hop-address: 100.65.1.9
494513
next-hop-interface: enp8s0
514+
weight: 200
495515
node5:
496516
bgpnet0:
497517
bgp_peer: 100.64.2.9
@@ -504,15 +524,20 @@ data:
504524
- destination: 99.99.0.0/16
505525
next-hop-address: 100.64.2.9
506526
next-hop-interface: enp7s0
527+
weight: 200
507528
- destination: 99.99.0.0/16
508529
next-hop-address: 100.65.2.9
509530
next-hop-interface: enp8s0
531+
weight: 200
510532
# routes to octavia mgmt network
511533
- destination: 172.24.0.0/16
512534
next-hop-address: 100.64.2.9
513535
next-hop-interface: enp7s0
536+
weight: 200
514537
- destination: 172.24.0.0/16
515538
next-hop-address: 100.65.2.9
539+
next-hop-interface: enp8s0
540+
weight: 200
516541
node6:
517542
bgpnet0:
518543
bgp_peer: 100.64.10.1

0 commit comments

Comments
 (0)