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

Pull BGP peering info out of metadata for equinixMetal platform #8267

Closed
rsmitty opened this issue Feb 5, 2024 · 6 comments · Fixed by #8480
Closed

Pull BGP peering info out of metadata for equinixMetal platform #8267

rsmitty opened this issue Feb 5, 2024 · 6 comments · Fixed by #8480
Assignees

Comments

@rsmitty
Copy link
Member

rsmitty commented Feb 5, 2024

We may be missing some other metadata for the EM platform. A user has reported they need a config patch like:

machine:
  network:
    interfaces:
      - interface: bond0
        routes:
          - network: 169.254.255.1/32
            gateway: 10.66.160.128
          - network: 169.254.255.2/32
            gateway: 10.66.160.128

in order to get BGP peering to work for their nodes there. Looking at https://deploy.equinix.com/developers/docs/metal/bgp/bgp-on-equinix-metal/ it seems that this info could be pulled out of the metadata server as part of the platform setup. We should explore this and include these routes by default if they are present.

@smira
Copy link
Member

smira commented Feb 6, 2024

We need an exact example of what we should translate from the metadata to the machine network config.

The page above only talks about announcing the IP on lo, everything else is about BGP config.

@rsmitty
Copy link
Member Author

rsmitty commented Feb 6, 2024

Yes agreed. We'll need to go through the process of setting this up in our EM account to see exactly what's needed. But my first assumption is that we just need to add routes to the bond if we have the peer_ips in the BGP neighbors section of the metadata. But yes, testing required here.

hh added a commit to ii/infra that referenced this issue Mar 8, 2024
In order to automatically configure the bond0, there is a kernel arg to
pull the metadata necessary to automatically configure the bond
interface.

We also use data.equinix_metal_device_bpg_neighbors to create the
routes... hopefully a step closer for siderolabs/talos#8267
@hh
Copy link

hh commented Mar 8, 2024

This is the approach I'm taking for now: ii/infra@a8f05e2

It's a first stab, but it does work!
Feedback welcome!

@hh
Copy link

hh commented Mar 8, 2024

Here are the resulting routes on bond0:

talosctl  --nodes 139.178.70.71,139.178.70.63,139.178.70.169 get routes | grep bond0 | grep inet4 | grep -v 10.67
139.178.70.71    network     RouteStatus   inet4//139.178.70.70/31/0                                   2         139.178.70.70/31                                           bond0          0
139.178.70.71    network     RouteStatus   inet4/139.178.70.70//1024                                   1                                         139.178.70.70              bond0          1024
139.178.70.71    network     RouteStatus   local/inet4//139.178.70.71/32/0                             114       139.178.70.71/32                                           bond0          0
139.178.70.71    network     RouteStatus   local/inet4//139.178.94.44/32/0                             86        139.178.94.44/32                                           bond0          0
139.178.70.63    network     RouteStatus   inet4//139.178.70.62/31/0                                   4         139.178.70.62/31                                           bond0          0
139.178.70.63    network     RouteStatus   inet4/139.178.70.62//1024                                   1                                         139.178.70.62              bond0          1024
139.178.70.63    network     RouteStatus   local/inet4//139.178.70.63/32/0                             129       139.178.70.63/32                                           bond0          0
139.178.70.169   network     RouteStatus   inet4//139.178.70.168/31/0                                  4         139.178.70.168/31                                          bond0          0
139.178.70.169   network     RouteStatus   inet4/139.178.70.168//1024                                  1                                         139.178.70.168             bond0          1024
139.178.70.169   network     RouteStatus   local/inet4//139.178.70.169/32/0                            130       139.178.70.169/32                                          bond0          0

@smira
Copy link
Member

smira commented Mar 11, 2024

@rsmitty is this what you've been looking for? routes to the BGP peers?

(I don't think we should announce any IPs)

@hh
Copy link

hh commented Mar 11, 2024

Pull from here : https://deploy.equinix.com/developers/docs/metal/server-metadata/metadata/#bgp-neighbors

I'd say this would be a reasonable addition to talos.platform=equinixMetal automation and populate the networking fully:

https://github.com/siderolabs/talos/blob/main/internal/app/machined/pkg/runtime/v1alpha1/platform/equinixmetal/equinix.go#L251

@smira smira self-assigned this Mar 21, 2024
hh added a commit to sharingio/infra that referenced this issue Apr 17, 2024
We previously did a lot of work to ensure BPG routes were added.
Also manually configuring the bond interfaces, this seems to be fixed.

siderolabs/talos#8267 (comment)
siderolabs/talos#8443

siderolabs/talos#8480
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants