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 regression in VC hardware detection for JunOS #9772

Merged

Conversation

Projects
None yet
2 participants
@martijn-schmidt
Copy link
Contributor

commented Feb 2, 2019

PR #9546 has resulted in Platform being detected as "Juniper Virtual Chassis Switch" when a set of devices is stacked. Hence, no more possibility to see whether it is for example an EX2300 or EX3400 virtual-chassis.

This commit falls back to using rewrite_junos_hardware() if the "Juniper Virtual Chassis Switch" string is detected in boxDescr, resulting in usable hardware data.

Example SNMP output from boxDescr on an EX3400-48T switch with VC enabled:
mschmidt@nlrtm1-librenms1:~$ snmpwalk -v2c -cremoved -m JUNIPER-MIB -M /opt/librenms/mibs hostname jnxBoxDescr
JUNIPER-MIB::jnxBoxDescr.0 = STRING: Juniper Virtual Chassis Switch

Caveat - it's possible to build a virtual-chassis of multiple switch models, but only for higher end hardware. With this commit, we would now report back the hardware only for the primary device: https://www.juniper.net/documentation/en_US/junos/topics/concept/virtual-chassis-ex4200-overview.html#jd0e75

You can detect the hardware of the individual members with the JUNIPER-VIRTUALCHASSIS-MIB which is already in the LibreNMS MIB directory, but I haven't implemented that since the whole virtual-chassis is polled by LibreNMS as one big device.

Example SNMP output:
mschmidt@martijn-dev:~$ snmpwalk -v2c -cremoved -m JUNIPER-VIRTUALCHASSIS-MIB -M /opt/librenms/mibs/junos hostname jnxVirtualChassisMemberModel
JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.0 = STRING: ex3400-48t
JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.1 = STRING: ex3400-48t

Also reported previously via the community forums:
https://community.librenms.org/t/pr-9546-results-in-junos-platform-detection-quirks-in-combination-with-virtual-chassis/6537

  • fixed a random comment typo I stumbled upon while investigating something else.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

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.

Fix regression in VC hardware detection for JunOS
PR #9546 has resulted in Platform being detected as
"Juniper Virtual Chassis Switch" when a set of devices
is stacked. Hence, no more possibility to see whether
it is for example an EX2300 or EX3400 virtual-chassis.

This commit falls back to using rewrite_junos_hardware()
if the "Juniper Virtual Chassis Switch" string is detected
in boxDescr, resulting in usable hardware data.

Caveat - it's possible to build a virtual-chassis of
multiple switch models, but only for higher end hardware:

https://www.juniper.net/documentation/en_US/junos/topics/concept/virtual-chassis-ex4200-overview.html#jd0e75

Example SNMP output:
mschmidt@nlrtm1-librenms1:~$ snmpwalk -v2c -cremoved -m JUNIPER-MIB -M /opt/librenms/mibs hostname jnxBoxDescr
JUNIPER-MIB::jnxBoxDescr.0 = STRING: Juniper Virtual Chassis Switch

Also reported previously via the community forums:
https://community.librenms.org/t/pr-9546-results-in-junos-platform-detection-quirks-in-combination-with-virtual-chassis/6537
@murrant

murrant approved these changes Feb 4, 2019

Copy link
Member

left a comment

LGTM

@murrant murrant merged commit 49f206f into librenms:master Feb 4, 2019

5 of 6 checks passed

codeclimate 1 issue to fix
Details
Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@murrant murrant added the Device 🖥 label Feb 4, 2019

@lock lock bot locked as resolved and limited conversation to collaborators Apr 5, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.