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

keepalive speaker clear datas when stopped #420

Merged
merged 1 commit into from
May 29, 2024

Conversation

renyunkang
Copy link
Member

Description

What type of PR is this ?:

fix: keepalive speaker clear datas when stopped

Related links:

@ks-ci-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@ks-ci-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 21, 2024
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()
Copy link
Contributor

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?

Copy link
Member Author

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?

@renyunkang renyunkang added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 22, 2024
@renyunkang renyunkang removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2024
@renyunkang
Copy link
Member Author

kindly ping @chaunceyjiang

Copy link
Contributor

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

/lgtm

@ks-ci-bot ks-ci-bot added lgtm Indicates that a PR is ready to be merged. labels May 29, 2024
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 5d047d0a665408a64d21ea4fbaa7896bfac20170

1 similar comment
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 5d047d0a665408a64d21ea4fbaa7896bfac20170

@ks-ci-bot ks-ci-bot merged commit 6a53578 into openelb:master May 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants