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

Yang leaves without smiv2:oid directive are not shown well in snmpwalk #398

Closed
doron2020 opened this issue Jan 9, 2023 · 5 comments
Closed

Comments

@doron2020
Copy link

Hello Olof, it is Doron & Stas from Siklu team

We have a problem that last item OID in a list is not properly shown in snmpwalk or it is not shown at all.

In this example (Attached) the last oid item in the list component is 1.3.6.1.2.1.47.1.1.1.1.16

When we do snmpwalk on oid 16 we get this error (No Such Object) even thou this item was filled with dada:

snmpwalk -v2c -c public 10.40.0.156 1.3.6.1.2.1.47.1.1.1.1.16
iso.3.6.1.2.1.47.1.1.1.1.16 = No Such Object available on this agent at this OID

snmpwalk on the item before it (oid 13) looks ok:

snmpwalk -v2c -c public 10.40.0.156 1.3.6.1.2.1.47.1.1.1.1.13
iso.3.6.1.2.1.47.1.1.1.1.13.1 = Hex-STRING: 4D 48 2D 42 33 36 36 2D 43 43 50 00

Now If we put the last oid item (oid 16) in comment

               //   smiv2:max-access "read-only";
               //   smiv2:oid "1.3.6.1.2.1.47.1.1.1.1.16";

This is the new result of snmpwalk for oid 13

snmpwalk -v2c -c public 10.40.0.156 1.3.6.1.2.1.47.1.1.1.1.13
iso.3.6.1.2.1.47.1.1.1.1.13.1 = Hex-STRING: 4D 48 2D 42 33 36 36 2D 43 43 50 00
iso.3.6.1.2.1.47.1.1.1.1.13.1.1 = INTEGER: 1 // an extra line is added.

Also some other items are defected as a result of commenting oid 16. For example oid 6

snmpwalk -v2c -c public 10.40.0.156 1.3.6.1.2.1.47.1.1.1.1.6
iso.3.6.1.2.1.47.1.1.1.1.6.1 = INTEGER: -1
iso.3.6.1.2.1.47.1.1.1.1.6.2 = INTEGER: 0
iso.3.6.1.2.1.47.1.1.1.1.6.3 = INTEGER: 1
iso.3.6.1.2.1.47.1.1.1.1.6.3.3 = INTEGER: 0 // extra line
iso.3.6.1.2.1.47.1.1.1.1.6.4 = INTEGER: 2
iso.3.6.1.2.1.47.1.1.1.1.6.4.4 = INTEGER: 0 // extra line
iso.3.6.1.2.1.47.1.1.1.1.6.5 = INTEGER: 3
iso.3.6.1.2.1.47.1.1.1.1.6.5.5 = INTEGER: 0 // extra line
..

This is the correct outoput of oid 6 when there is no comment for oid 16:

iso.3.6.1.2.1.47.1.1.1.1.6.1 = INTEGER: -1
iso.3.6.1.2.1.47.1.1.1.1.6.2 = INTEGER: 0
iso.3.6.1.2.1.47.1.1.1.1.6.3 = INTEGER: 1
iso.3.6.1.2.1.47.1.1.1.1.6.4 = INTEGER: 2
iso.3.6.1.2.1.47.1.1.1.1.6.5 = INTEGER: 3
...

Attached the yang file

Thank you
Doron & Stas

radio-bridge-tg-inventory.yang.txt

@olofhagsand olofhagsand added the bug label Jan 9, 2023
@krihal
Copy link
Collaborator

krihal commented Jan 9, 2023

Hi,

I'll see if I can reproduce this bug as well just like #396.

Thanks,
/K

@krihal
Copy link
Collaborator

krihal commented Jan 10, 2023

Hi,

Can you share the MIB with us for this one as well? We'd like to test to convert the MIB to YANG using smidump and reproduce the error.

BR

@doron2020 doron2020 changed the title snmwalk for last OID in list is not shown properly Yang leaves without smiv2:oid directive are not shown well in snmpwalk Jan 17, 2023
@doron2020
Copy link
Author

doron2020 commented Jan 17, 2023

I have changed the description of bug from "snmwalk for last OID in list is not shown properly" to "Yang leaves without smiv2:oid directive are not shown well in snmpwalk" since this is the actual problem. Leaves without smiv2:oid directive should be ignored in snmpwalk.
We have a solution to that and will suggest a fix to clicon/clixon

doron2020 pushed a commit to doron2020/clixon that referenced this issue Jan 17, 2023
doron2020 pushed a commit to doron2020/clixon that referenced this issue Jan 17, 2023
@olofhagsand
Copy link
Member

The PR does not work properly, there are warnings and fails in docker/CI

doron2020 pushed a commit to doron2020/clixon that referenced this issue Jan 18, 2023
doron2020 pushed a commit to doron2020/clixon that referenced this issue Jan 18, 2023
@olofhagsand
Copy link
Member

PR merged with master, please verify and close if OK

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

3 participants