Skip to content

Ctor 2476 rust snmp panic when oid does not exist on host - #6327

Open
Evan-Adam wants to merge 11 commits into
developfrom
CTOR-2476-rust-snmp-panic-when-oid-does-not-exist-on-host
Open

Ctor 2476 rust snmp panic when oid does not exist on host#6327
Evan-Adam wants to merge 11 commits into
developfrom
CTOR-2476-rust-snmp-panic-when-oid-does-not-exist-on-host

Conversation

@Evan-Adam

@Evan-Adam Evan-Adam commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

  • enhance snmp module to avoid panic and simplify internal types matching
  • add many unit test for snmp library
  • update all dependancy to lastest version
  • fix a bug where plugin always exited with ok status when threshold where met
  • enhance panic handler in main function to print the panic message
  • snmp_bulk_get, snmp_bulk_walk, and snmp_bulk_walk_with_labels now propagate transport/decode errors instead of silently ignoring them, and a request that yields no data at all no longer produces a misleading OK.

Fixes CTOR-2476

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

See unit test in rust-plugins/src/snmp/mod.rs
image

And robot test in tests/os/linux with tag centreon-plugin-rust-snmp

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • In case of a new plugin, I have created the new packaging directory accordingly.
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • I have reviewed all the help messages in all the .pm files I have modified.
    • All sentences begin with a capital letter.
    • All sentences end with a period.
    • I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

@Evan-Adam
Evan-Adam marked this pull request as ready for review July 31, 2026 15:55
@Evan-Adam
Evan-Adam requested review from a team as code owners July 31, 2026 15:55
@Evan-Adam
Evan-Adam requested review from jean-christophe81, omercier and sechkem and removed request for a team July 31, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant