When performing an SNMP walk (GETNEXT operations) over interface counter MIBs, if any interface lacks expected counters in COUNTERS_DB, the walk silently skips all subsequent valid entries and jumps to the next MIB subtree.
This is incorrect - a None value for one sub_id does not mean there are no more valid entries. The method should continue iterating to the next sub_id until a valid value is found or all entries are exhausted.
Steps to Reproduce
- Have a setup where some interfaces lack counter entries in
COUNTERS_DB (e.g., ports that only have IN_DROPPED_PKTS and OUT_DROPPED_PKTS, or no counters at all)
- Ensure these counter-less interfaces appear in OID ordering before other valid interfaces (e.g., PortChannels)
- Perform an SNMP walk over an interface counter MIB (e.g.,
ifInDiscards)
The interfaces ordered after the counter-less ones will be missing from the walk results
cc: @anders-nexthop, @bhouse-nexthop
When performing an SNMP walk (GETNEXT operations) over interface counter MIBs, if any interface lacks expected counters in
COUNTERS_DB, the walk silently skips all subsequent valid entries and jumps to the next MIB subtree.This is incorrect - a
Nonevalue for one sub_id does not mean there are no more valid entries. The method should continue iterating to the next sub_id until a valid value is found or all entries are exhausted.Steps to Reproduce
COUNTERS_DB(e.g., ports that only haveIN_DROPPED_PKTSandOUT_DROPPED_PKTS, or no counters at all)ifInDiscards)The interfaces ordered after the counter-less ones will be missing from the walk results
cc: @anders-nexthop, @bhouse-nexthop