-
Notifications
You must be signed in to change notification settings - Fork 194
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
keepalive speaker clear datas when stopped #420
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: renyunkang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: renyunkang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/speaker/vip/keepalived.go
Outdated
for _, i := range k.instances { | ||
klog.Infof("removing configured VIP %v", i.Svcips) | ||
for _, vip := range i.Svcips { | ||
out, err := k8sexec.New().Command("ip", "addr", "del", vip+"/32", "dev", i.Iface).CombinedOutput() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a need to actively delete the vip here?
My understanding is that it should be automatically deleted after keepAlived stops, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a need to actively delete the vip here?
My understanding is that it should be automatically deleted after keepAlived stops, right?
You’ve understood correctly. The current issue is that when the main process exits, the keepalived process of the speaker has not been fully reclaimed, causing the problem.
Therefore, the recovery operation here can only be performed synchronously. We can add a CleanUp function to the Speaker Interface, which will be called to handle recovery when a signal interruption occurs. We can also use channel communication or a waitGroup.
Do you have any other better ideas?
Signed-off-by: renyunkang <[email protected]>
kindly ping @chaunceyjiang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
/lgtm
LGTM label has been added. Git tree hash: 5d047d0a665408a64d21ea4fbaa7896bfac20170
|
1 similar comment
LGTM label has been added. Git tree hash: 5d047d0a665408a64d21ea4fbaa7896bfac20170
|
Description
What type of PR is this ?:
fix: keepalive speaker clear datas when stopped
Related links: