-
Notifications
You must be signed in to change notification settings - Fork 27
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
skip the return of err when the error in veth create is due to existi... #76
Open
sar772004
wants to merge
4
commits into
networkop:master
Choose a base branch
from
sar772004:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
do you just assume that the link was created correctly here? would there be a case when the link is not configured properly at this stage?
I'm thinking another option is to delete and recreate the link but I'm not sure if it's really needed
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.
My thought was the peer pod which is creating the link in first place ( probably because it has higher priority), will handle any failures.
Also question for you:
can you elaborate the skipping logic,
We could handle this condition probably differently based on above
if isSkipped.Response || higherPrio { // If peer POD skipped us (booted before us) or we have a higher priority
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.
yeah, I guess if the peer pod fails to create the link then the error would bubble up and CNI will retry.
wrt your question, the skipping logic is a bit hard to reason about, mainly because of the CNI deletion command (when CNI fails to correctly setup the interfaces or Pod gets deleted by kubelet).
When Pods are being created for the first time, skipped is set by a pod on its peer if the peer is not alive yet. the idea is that once the peer comes up, it will plug in all of the interfaces. So when
isSkipped.Response == True
, we have to do the work. Priority is a local tie-breaker for the condition when two pods are both coming up at the same time and none of them is skipped.So, in your case, I'd expect that the existing interface should be detected by this logic
meshnet-cni/plugin/meshnet.go
Lines 261 to 262 in 56abbfc
I still don't fully understand what needs to happen for a pod to come up, reach this stage of the code and see this error. I'm fine with this solution as a workaround but ideally, I'd prefer to handle this explicitly in the code logic rather than catching an error.
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.
Based on your logs, it's clear that the peer pod has come up before us and has skipped us, so priority doesn't come into play, only the
skipped
flag is true. Which means that the peer pod should have never even attempted to plug in the interfaces, which is why I don't understand why you're getting thefile exists
error.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.
@sar772004, I tried to reproduce this issue with a full mesh topology of 8 pods (and 28 links) in a kind cluster with a single worker node. But I am not able to reproduce this issue in my setup. It does not happen during new topology creation. I tried to delete/add/replace a pod and I get a different issue which is expected but I dont see this issue. Can you please share following information?
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.
I will try this early next week. Thanks
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.
@sar772004 since PR #80 is merged now, you can play with the networkop/meshnet. No need to use my branch that I will delete anytime.
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.
I tried latest meshnet and there is some issue with pods and the links between them, I did not have the bandwidth to check in detail. But its the same setup i mentioned above. Attaching the latest logs and yaml for your reference.
meshnet-cni.log
meshnet_links.yaml.txt
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.
Hi @sar772004, can you please share the corresponding meshnet daemon logs from the node from where you have collected meshnet-cni.log? It is required to see the actual error message why 'Skip' fails.From the logs, it seems that few pods e.g. test, dut-bridge, went through failure but ultimately that failed pods came up.
What are the issues you are observing from application point of view like pod at init or imageerr, etc?
I ran this topology both in vxlan and grpc mode with single and multiple nodes around 10 times. It went fine. I ran in kind cluster.
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.
Hi @manomugdha Sorry long weekend here, i don't have the setup at the moment, But the issue is when the links are all "veth" . i.e all the pods are in single compute.
All pods had come up eventually. but my use case was failing due to missing synchronization between active/standby CPU pods, some of these backplane links run through dut_bridge pod (acts as a bridge). And the software running on the CPU pod expects the links to be up before it starts.. I do have startup probes on these pods to confirm the backplane link status, but its possible one end of the bridge link was not up.
I will try to set it up again and get the meshnet daemon logs.
NOTE: this worked when i was using #76 itself.