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

Metallb in l2 mode should publish an event indicating which node is advertising a vip. #430

Closed
mauilion opened this issue Apr 23, 2019 · 9 comments

Comments

@mauilion
Copy link

mauilion commented Apr 23, 2019

Feature Request:

in L2 mode it would help to understand what node is servicing a given vip.
Ideally, the speaker could publish an event to the service object indicating the node that has "won" the election for a given vip.

If we need to move to another node a new event should be published to that service object. So that we can understand that the ip is now served by a different speaker.

This is helpful when trying to understand how l2 mode will interact with the underlying network.

@mauilion
Copy link
Author

This could also help to isolate issues where in l2 mode arp is taking longer to timeout on re election :)

@zetaab
Copy link

zetaab commented Jun 26, 2019

What kind of event you mean? There is already one log message coming when the ip address is active in speaker: https://github.com/danderson/metallb/blob/master/speaker/main.go#L229

it looks like:

{"caller":"main.go:229","event":"serviceAnnounced","ip":"10.1.0.31","msg":"service has IP, announcing","pool":"default","protocol":"layer2","service":"metallb-system/test","ts":"2019-06-26T06:36:35.677084247Z"}

@danderson
Copy link
Contributor

Fixed in 5cc6e23, just forgot to link it via the commit msg. Will be in next release.

@falfaro
Copy link

falfaro commented Jul 24, 2019

How does this work? I've updated to MetalLB 0.8.0 and I can't see any events published in any of my LoadBalanced Services.

@danderson
Copy link
Contributor

There's a couple of issues with this, #455 and #456 . Together, they prevent publishing these events, and also the event itself contains no information :(

I'll release 0.8.1 later today with fixes.

@jmlogan
Copy link

jmlogan commented Sep 14, 2021

Is this Event periodically published? Events are retained for 1h by default, and am not sure if this Event is published more frequently. I am trying to find the Speaker for a service that is rather old, and nothing is showing in the describe.

@fedepaol
Copy link
Member

Is this Event periodically published? Events are retained for 1h by default, and am not sure if this Event is published more frequently. I am trying to find the Speaker for a service that is rather old, and nothing is showing in the describe.

Hi @jmlogan , the event is published only when the speaker association is done (here). If nothing changes in the service or in the list of endpoints, I believe the event is not produced (and in any case, I am sure it's not produced periodically).

@fedepaol
Copy link
Member

Just to add more info, the association between service / node / lbip is avaliable as prometheus metric too :

announcing.With(prometheus.Labels{

@zhucan
Copy link

zhucan commented Nov 18, 2022

so, how to know the leader is? Is there doc for this?

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

No branches or pull requests

7 participants