-
Notifications
You must be signed in to change notification settings - Fork 468
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
Mismatched local address when peering with external router on difference network #1371
Comments
@pmint93 - Thanks for doing some leg work on tracking down the issue. I agree with you, that #777 is likely is stopping you from peering on all interfaces. One of the questions that I had while looking at your scenario, is how valuable it would be to actually be able to create this peering? I ask this because there may be places in the code that makes assumptions about the external peers being able to reach the network of the primary node IP like this one: https://github.com/cloudnativelabs/kube-router/blob/master/pkg/controllers/routing/ecmp_vip.go#L32 So, even if you are able to peer from a different address, if your node isn't capable of routing to the network of the primary IP you may still run into routing issues. Have you tried reverting #777 and building locally to ensure that kube-router will meet your expectations with the Going back to the expectation in this issue, while I could maybe see that the current setting is perhaps a bit restrictive, I'm not a huge fan of going back to allowing BGP to bind to all addresses on the node, that seems a bit over-permissive. Do you have a recommendation on what you think would be a fair compromise in order to fix your use-case (preferably something that didn't introduce a new global flag to kube-router)? |
@pmint93 How about running a dynamic routing daemon and advertising a loopback address from both interfaces on each worker? You can use their loopback address as nodeIP, so workerA and workerB peer with each other from their loopback address, and they peer with the external router from their loopback address. |
@aauren
I'm using
Not yet, but i can confirm v1.4.0 is working as expected
I already use |
@tamihiro Perhaps it will work but i think that just a workaround to abstract away actual network topology |
After reading code changes in PR #777, the exactly lines of code that run me into this issue are: kube-router/pkg/controllers/routing/network_routes_controller.go Lines 1123 to 1126 in 9aad2d6
That assuming external peers ( a. Detect the correct interfaces which can route to OR b. Introduce new flags OR c. Revert those changes except for the internal peers. I think issue #778 only related to internal peers |
Since I'm yet to understand exactly what you mean by "trying to separate k8s control plane" so I don't have further suggestion, but
peering from a loopback address is not really an uncommon practice even when it's external. It could keep network design and configurations relatively simple in many cases besides offering L3 redundancy. |
A test build of rkojedzinszky@3982738 is available here: https://github.com/rkojedzinszky/kube-router/pkgs/container/kube-router/48498391?tag=amd64-issue-1391 |
Thanks for putting together a PR @rkojedzinszky @pmint93 / @rkojedzinszky - as it concerns the change though, from a user perspective, it seems a bit confusing to me that we would have both For instance, what would be the purpose of allowing GoBGP to listen on an address with Any thoughts here? |
@pmint93 Additionally, I still really like your option
This seems like a pretty natural way to infer what the bind address should be. Although, it should probably also be constrained by
Thoughts? |
As I understand, the two configuration options serves different purposes. Of course, they may overlap, but there also might be cases when one will list 2 addresses in As I understand originally #777 intended to fix internal bgp connections, howewer, it also did set localaddress for external networks. So, perhaps we could relax this a bit, not enforcing nodeIP as localaddress for external peers. |
I would prefer simpler solutions where less logic is involved. |
@rkojedzinszky - Sorry it has taken me a while to come back to this. I see your point and think that the PR that you've suggested is probably a good enough compromise and allows us to stay true to the configuration syntax in GoBGP. I personally don't like starting another list based peering annotation, but I can see that it would give some users the flexibility they desire and it doesn't really introduce all that much overhead for the project to maintain one more annotation. I left one comment on your PR, once that is cleared up, we should be able to merge it. |
@aauren Sorry for late reply, i missed your last mention. IMO,:
|
This should be fixed with the merging of #1392 This should be test-able using the kube-router-git container from Docker Hub. @pmint93 in regards to annotations not being ideal, I think that this will get fixed other ways in the future. There are already two open issues / comments for this issue:
I intend to look into both of them once I'm done finishing up the dual-stack work that the project has been working towards. In the meantime, not upgrading to v1.5.0 or ensuring that the annotation is present before kube-router starts, or doing a rollout restart should fix the issue. Closing this issue for now just as a matter of house-cleaning, but @rkojedzinszky / @pmint93 feel free to comment if you discover further issues after testing the fix and I'll re-open. |
This was released as part of |
Seem v1.5.3 did not working. I keep seeing error message This line of code (which was introduced in #1392) did not get called kube-router/pkg/controllers/routing/network_routes_controller.go Lines 1149 to 1150 in 31e0245
due to precondition
because kube-router/pkg/controllers/routing/network_routes_controller.go Lines 1344 to 1345 in 31e0245
and with localips set to @rkojedzinszky Does v1.5.3 working for you ? |
@pmint93 This is intended to work when only annotations are used to configure external peers. Does your setup use external connections configured from command line? Right now we are not using v1.5.3 anywhere. I need some time to test it. |
@rkojedzinszky Yes, I did config kube-router with |
What happened?
kube-router v1.5 did not peer with external router on difference network (
Mismatched local address
)My cluster setup has worker nodes join 2 difference networks (see figure bellow) and kube-router was configured to peer with external router https://github.com/cloudnativelabs/kube-router/blob/master/docs/bgp.md#peering-outside-the-cluster
What did you expect to happen?
Peer state is Established
How can we reproduce the behavior you experienced?
Steps to reproduce the behavior:
--peer-router-ips
--peer-router-asns
to peer with external routergobgp neighbor
to see that the peer state did not EstablishedScreenshots / Architecture Diagrams / Network Topologies
System Information (please complete the following information):
--peer-router-ips=<EXTERNAL_PEER_IP>
Logs, other output, metrics
Additional context
This PR seem to be the reason #777
The text was updated successfully, but these errors were encountered: