Skip to content
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

bird default multipath gw (ECMP) is not propagated to local kernel #4114

Closed
misi opened this issue Oct 21, 2020 · 4 comments
Closed

bird default multipath gw (ECMP) is not propagated to local kernel #4114

misi opened this issue Oct 21, 2020 · 4 comments

Comments

@misi
Copy link

misi commented Oct 21, 2020

Expected Behavior

I advertise using BGP to the k8s nodes default GW from external Route Reflectors to nodes.
Calico receives it successfully I can see in calico node bird config, but it doesn't put multipath gw route into kernel table.
It puts only one path from the received multipath.

Current Behavior

Only one path is exported to the kernel from bird routing table.

Possible Solution

Add only one option to bird's config in kernel

merge paths on
e.g.
merge paths on; # Add multipath to route to kernel e.g. for ECMP egress

Add to /etc/calico/confd/templates/bird.cfg.template

# Configure synchronization between routing tables and kernel.
protocol kernel {
  learn;             # Learn all alien routes from the kernel
  persist;           # Don't remove routes on bird shutdown
  scan time 2;       # Scan kernel routing table every 2 seconds
  import all;
  export filter calico_kernel_programming; # Default is export none
  graceful restart;  # Turn on graceful restart to reduce potential flaps in
                     # routes when reloading BIRD configuration.  With a full
                     # automatic mesh, there is no way to prevent BGP from
                     # flapping since multiple nodes update their BGP
                     # configuration at the same time, GR is not guaranteed to
                     # work correctly in this scenario.
  merge paths on;    # Add multipath to route to kernel e.g. for ECMP egress
}

Steps to Reproduce (for bugs)

  1. Advertise multipath 0.0.0.0/0 to calico nodes
  2. Compare bird routing table and kernel routing table

Context

The goal is to ECMP loadbalance egress traffic between GW-s.

Your Environment

  • Calico version: 3.16.1
  • Kubernetes 1.19.2
  • Operating System and version: Ubuntu 18.04.5
@nelljerram
Copy link
Member

@misi Thank you!

Your Felix PR is good, and I've approved it, but the BIRD config there is just by way of example. In order to fix this for actual Calico deployments, we need the same change at https://github.com/projectcalico/confd/blob/master/etc/calico/confd/templates/bird.cfg.template#L88 and https://github.com/projectcalico/confd/blob/master/etc/calico/confd/templates/bird6.cfg.template#L89. Would you like to submit a confd PR with those changes?

@misi
Copy link
Author

misi commented Oct 21, 2020

@neiljerram Thanks! Sure. I will submit it.

@misi
Copy link
Author

misi commented Oct 22, 2020

@neiljerram I added, and now it pass the CI test and so it is now waiting for a review.
If you have little bit time then can you please check it!
Many thanks for your help and cooperation!

@nelljerram
Copy link
Member

Fixed by projectcalico/confd#379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants