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

Error getting lldp neighbors for SW_NAME: port mapping for EthernetXYZ not found in switch #390

Open
pau-hedgehog opened this issue Feb 11, 2025 · 3 comments

Comments

@pau-hedgehog
Copy link
Contributor

https://github.com/githedgehog/fabricator/actions/runs/13253638857/job/37039555325

18:26:11 ERR Failed to inspect LLDP err="getting lldp neighbors for ds3000-02: port mapping for Ethernet125 not found in switch ds3000-01"
18:26:11 ERR Failed to inspect fabric took=9m0.850008907s
Switch: ds3000-01
18:26:11 WRN Failed to inspect err="failed to inspect fabric"

18:26:11 INF sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go:108: watch of *v1beta1.Connection ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
@pau-hedgehog
Copy link
Contributor Author

@edipascale
Copy link
Contributor

The code expects to find a mapping for this port name in:

https://github.com/githedgehog/fabric/blob/d7735c592dcae758e2fcce8406f49d30651660b7/pkg/util/apiutil/lldp.go#L177

The port mappings are loaded earlier in:

https://github.com/githedgehog/fabric/blob/d7735c592dcae758e2fcce8406f49d30651660b7/pkg/util/apiutil/lldp.go#L66

I dug a bit in the code; from the error text I thought there was an issue where a port mapping for a different switch was being used by mistake (and your comment makes me think you probably thought the same), but it looks like that is not the case. Port mappings are correctly collected, and then for each switch we iterate over the interfaces, check the remote switch based on the lldp information, and use that switch port mapping to resolve it (so we can display it in the lldp neighbor status). The question is why this fails in this particular case, but it's not obvious to me inspecting the code, unless say the state we saved for lldp for that particular interface was wrong.

@edipascale
Copy link
Contributor

Note that this commit in fabric makes it a warning rather than an error, so this issue will no longer break the CI

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

2 participants