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

Kv lsp enabled flag #4794

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

qinqon
Copy link
Contributor

@qinqon qinqon commented Oct 22, 2024

What this PR does and why is it needed

Which issue(s) this PR fixes

Fixes #

Special notes for reviewers

How to verify it

Details to documentation updates

Description for the changelog

Does this PR introduce a user-facing change?


RamLavi and others added 3 commits October 21, 2024 10:07
Doing so will allow dynamically controlling the LSP during cases like vm
live migration in order to optimize downtime. This will be introduced in
future commits.

Signed-off-by: Ram Lavi <[email protected]>
currently all pods have the LSP.Enabled option set to true by default.
During migration, it makes sense to handoff the network traffic from the
source to target pod as soon as the target pod is up and ready for
traffic.
The handoff is done by closing the LSP of the source port.
Doing this significantly reduces the migration downtime.

This traffic handoff optimization is currently restricted to VM with
only secondary interfaces, and layer2 topology.

Signed-off-by: Ram Lavi <[email protected]>
@@ -1178,6 +1187,6 @@ func (bnc *BaseNetworkController) wasPodReleasedBeforeStartup(uid, nad string) b
return bnc.releasedPodsBeforeStartup[nad].Has(uid)
}

func isAllowedForMigration(isSecondary, isPrimaryNetwork, isl2Topology bool) bool {
return isSecondary && !isPrimaryNetwork && isl2Topology
func (bnc *BaseNetworkController) isAllowedForMigration() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd have this as a function instead. There's no need for the layer3 controller to have this method for instance.

Also, should't localnet be also a "customer" of this feature ?... The exact same mechanism should be re-used there to improve the migration downtime, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having a function that is going to receive NetInfo is kind of the same also if will be in the same context as layer3, also I am total agains a free function receiving random booleans.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what you mean, but FWIW, I also don't want a function that receives random booleans.

Comment on lines +422 to +423
SourcePod: vmPods[0],
TargetPod: vmPods[1],
Copy link
Contributor

Choose a reason for hiding this comment

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

could we trim down the objects ? IIUC we just require the labels on the pods. Right ?

if isSourcePodAlreadyStale(pod, vmPods) && isTargetPodReady(getTargetPod(vmPods)) {
return true, nil
if len(vmPods) > 2 {
return nil, fmt.Errorf("unexpected live migration state at pods: %+v", vmPods)
Copy link
Contributor

@maiqueb maiqueb Oct 24, 2024

Choose a reason for hiding this comment

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

too much info IMHO - while I understand having all potential relevant information at hand is helpful, we'd drown in data ...

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

Successfully merging this pull request may close these issues.

3 participants