-
Notifications
You must be signed in to change notification settings - Fork 8
failover revisit #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failover revisit #1253
Conversation
|
The CI tests fail in this pipeline because I made it mandatory to know the BGP communities to advertise a route. Before, I made dataplane more forgiving and let it advertise anyway routes, while the fabric part was in the making. However, for a correct behavior of the failover strategy, no gateway should advertise routes without them IMO. No community seems to be set according to the table dumped by dataplane. And, then the config is rejected: This is affected by githedgehog/gateway#305 |
5c4ea1f to
8196637
Compare
45d5c74 to
ebf1a2e
Compare
|
We do now, you'll have to wait for the gateway bump in the fabricator |
Forbid peerings that are not mapped to a gateway group. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
When analyzing the priorities of a gateway for a VPC peering, if a gateway is part of the group responsible for that peering, fail if no community is available for its position in the ranked list of gateways to service the peering. This can only happen if the number of members in a group exceeds the numer of communities available. Also, simplify the logic, avoid unnecessary conversions between integer types and improve the tests. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Let the internal config have a community table and gateway group, and copy them from the external config. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Set the BGP communities of prefixes advertised in the context of a VPC peering from the internal config gateway group table and BGP community table, instead of the Peering object. Also, do not advertise any prefix if we can't determine the corresponding community. This change provides a better separation between what constitutes input configuration (external config) and its processing (internal config). Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
We no longer store communities in the Peering object, as we compute them from the community and gateway tables stored in the internal configuration. The validation will still be made on the External config, which will be significantly simplified by not storing the communities in the Peering. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
A VPC peering has to be mapped to a gateway group to be valid. In the initial implementation, internally, a peeering kept an optional reference to a group. The validation now requires a peering to have it. So, fix the tests that failed because of this stricter validatio by adding a constructor that sets the reference to a "default" group. We do not add this in the implementation of Peering::default(), as we do not want to default a value that is not provided by the configuration in this case, and we may make it non-optional in the future, once the tests are cleaned up. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Within a group, we prefer (order as first) gateways with highest priority value. In case of ties, we prefer gateways in alphabe- tical order. We do this by sorting the members of each group and defining Ord for members. The impl Ord compares also the ip address of members if their name is Equal. This will never happen within a gateway group as we require all members to have a distinct name. Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
bdce861 to
56793a4
Compare
qmonnet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK
This goes on top of #1245Summary: