Repository navigation
Commit ff8d28b
committed
tests/e2e: cover the BGP peering modes
Nothing in the golden set distinguished a numbered BGP session from an
unnumbered one on the paths that generate most of them. e2e-portchannel
modelled an uncabled LAG, so its BGP_NEIGHBOR and BGP_NEIGHBOR_AF were
both empty -- get_connected_interfaces() marks a port channel connected
only when a member is cabled, so those loops were never entered at all.
No fixture reached the shape where an interface carries no address of
its own while the endpoint it faces carries one, which is where the
neighbour identity and the address family selection can disagree.
Two blocks are added to 600-portchannel.yml.
The first cables both members of PortChannel1 to e2e-metalbox-1, whose
side is a LAG as well: an aggregate cabled to two standalone routed
ports would not form. The peer address sits on that aggregate, not on
the cabled members, which is the conventional way to model it. Two
lookups would have to reach it and neither does -- the resolver's LAG
member fallback is off for BGP on purpose, and nothing follows a member
up to the peer's own aggregate -- so this pins the port channel peering
unnumbered, and it moves the day either lookup changes. The numbered
port-channel case cannot be reached from NetBox data at all, since a
LAG interface is not cablable; the unit tests pin that one.
The second gives the device a plain port with no address facing a
metalbox port that has one, outside any Transfer prefix. With no local
address there is nothing to source a numbered session from, so the
peering is link-local and both address families are activated on
Ethernet8. The two tables do not agree on who the peer is: the
neighbour is keyed by the address found on the far end while the
address families are keyed by the interface, so the golden records a
session whose halves point at different names. That disagreement is as
much the reason for this block as the peering mode is -- nothing else
in tree captures it, and it moves the day the two are derived from one
decision.
e2e-metalbox-1 is the peer in both because it has no SONiC role and no
managed-by-metalbox tag, so it never gets a golden of its own and the
churn stays in this device's golden.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Roger Luethi <luethi@osism.tech>1 parent 051ede1 commit ff8d28b
2 files changed
Lines changed: 146 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
41 | 63 | | |
42 | 64 | | |
43 | 65 | | |
| |||
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
52 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
53 | 79 | | |
54 | 80 | | |
55 | 81 | | |
| |||
420 | 446 | | |
421 | 447 | | |
422 | 448 | | |
423 | | - | |
| 449 | + | |
424 | 450 | | |
425 | 451 | | |
426 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
| 49 | + | |
| 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 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
0 commit comments