siderolabs / omni

SaaS-simple deployment of Kubernetes - on your own hardware.
Other
489 stars 26 forks source link

[bug] `siderolink-wireguard-advertised-addr` accepts both IPv4 and IPv6 addresses, but Talos fails to parse the result #495

Closed samip5 closed 2 weeks ago

samip5 commented 1 month ago

Is there an existing issue for this?

Current Behavior

Currently the argument will accept both address families but then fail to parse it on Talos

Expected Behavior

I expected it to be able to connect via either IPv6 address or IPv4, but instead talos says too many colons in address.

Steps To Reproduce

  1. Deploy Omni somewhere where it has dual-stack support
  2. Specify via siderolink-wireguard-advertised-addr both address families like --siderolink-wireguard-advertised-addr=[2a01:<snip>:<snip>:559::1]:50180,65.<snip>.<snip>.136:50180
  3. Download install media and boot up machines with it

What browsers are you seeing the problem on?

No response

Anything else?

I wasn't sure if this issue should be created here or in Talos repo.

DmitriyMV commented 1 month ago

It looks like wireguard library doesn't support specifying several endpoints for the single peer, so the only thing we can do is prohibit specifying two and more IP's in siderolink-wireguard-advertised-addr.

Update: yeah it's looks like wireguard itself doesn't support multiple server endpoints

samip5 commented 1 month ago

It looks like wireguard library doesn't support specifying several endpoints for the single peer, so the only thing we can do is prohibit specifying two and more IP's in siderolink-wireguard-advertised-addr.

Update: yeah it's looks like wireguard itself doesn't support multiple server endpoints

But it works absolutely fine if one uses a DNS host name in that value instead but yes prohibit two addresses.

DmitriyMV commented 1 month ago

Yes, if we go with user mode endpoint rotation we can do it. There will be some delay if first endpoint is unavailable and same applies during endpoints rotation.