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

fix bdcom/pbn neighbour discovery #15935

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

freddy36
Copy link

@freddy36 freddy36 commented Apr 10, 2024

fix bdcom/pbn neighbour discovery

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@CLAassistant
Copy link

CLAassistant commented Apr 10, 2024

CLA assistant check
All committers have signed the CLA.

@freddy36 freddy36 marked this pull request as draft April 10, 2024 16:25
@freddy36
Copy link
Author

freddy36 commented Apr 10, 2024

The current neighbour discovery code doesn't seem to work at all.

The bdcom snmpsim file doesn't contain any neighbour discovery realted records, so I can't check if there are any format changes.

@hrtrd @murrant @kakopedreros @vitalisator @Rosiak @laf: you contributed BDCOM/PBN code before, can you check if LLDP neighbour discovery is working with your devices and the current librenms master code?

@PipoCanaja
Copy link
Contributor

Hi @freddy36
Thanx for your contribution.
Please take a few minutes to sign the CLA.

And concerning the tests, this code has been changed to use the newer SNMP methods. As you noticed, test data was missing, so it was probably broken during it. So please add test data to you change, and we'll get it merged when ready. If it breaks things, we'll get more test data from other users and improve the code to handle different versions.

@PipoCanaja PipoCanaja added Device 🖥️ New or added device support Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/ labels Apr 10, 2024
Copy link

Please add test data so we can ensure your change is not broken in the future.
Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

@PipoCanaja
Copy link
Contributor

Please ignore the current test failures, it is linked to another PR and will be fixed ASAP.

@PipoCanaja PipoCanaja closed this Apr 10, 2024
@PipoCanaja
Copy link
Contributor

re-run tests

@PipoCanaja PipoCanaja reopened this Apr 10, 2024
@freddy36
Copy link
Author

I've added a test.

While the snmprec file contains the relevant OIDs (1.3.6.1.4.1.3320.127.1.4.1.1), the save-test-data.php script apparently doesn't run/care about the results of the discovery-protocols modul (no neighbour informations are included in the json).

Is this the intended behaviour?
I even tried to explicitly run the module via ./scripts/save-test-data.php -o bdcom -v S2900-24S8C4X -m discovery-protocols

@freddy36 freddy36 marked this pull request as ready for review April 12, 2024 08:10
@PipoCanaja PipoCanaja removed the Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/ label Apr 18, 2024
@PipoCanaja
Copy link
Contributor

Ok. Let see if we have a few testers for your patch. You are right, JSON does not compute links (including neighbors) right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Device 🖥️ New or added device support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants