Open Skaronator opened 1 week ago
Hi, this is indeed wrong.
Can you please provide the output of k0s etcd member-list
as well?
Sure!
root@node1:~# k0s etcd member-list
{"members":{"node1":"https://192.168.0.5:2380"}}
I think the issue is that my primary network interface has two IPs due to the CPLB?
That smells like it's the problem, yes. The original PR just skipped the dummy interface and didn't take into account that the virtual IP could be attached to a different interface, as well. Still not sure why k0s chose the second address. The assumption was that Go's net.Interfaces()
returns interfaces and addresses in the "operating system's order". K0s picks the first non-loopback address, which should have been .5. :thinking:
A proper fix would be to exclude/blacklist VRRP IPs when determining the address. The code is currently structured in a way that makes make this difficult. On the other hand, k0s should probably also prefer the primary (i.e. non-secondary) address of an interface. That's self-contained and should be enough to fix this issue.
Before creating an issue, make sure you've checked the following:
Platform
Version
v1.30.2+k0s.0
Sysinfo
`k0s sysinfo`
What happened?
I thought the fix in #4582 would solve this issue, but k0s still puts the CPLB IP as etcd.peerAddress IP.
Steps to reproduce
privateInterface
from the configk0sctl apply
Expected behavior
This is my k0sctl.yaml currently deployed:
Resulting in this k0s.yaml on the node:
After the fix in #4582, I thought I can remove the privateInterface from my config. And I would still get the same
k0s.yaml
on my node and everything continue to work.Actual behavior
Removing
privateInterface
still adds etcd.peerAddress which points to the CPLB IP which is WRONG.Screenshots and logs
No response
Additional context
I think the issue is that my primary network interface has two IPs due to the CPLB?