[SNMP4SDN-10] Can not support PortID subtype: Interface name Created: 25/Oct/15  Updated: 19/Oct/17  Resolved: 23/Feb/16

Status: Resolved
Project: snmp4sdn
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Nanfei Chen Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4524

 Description   

Three switches on which the PortID subtype is Interface name are used in my experiment, and the connection between them is as follows:
switch1(GigabitEthernet1/0/1,177.0.0.104)-------(GigabitEthernet1/0/1,177.0.0.105) switch2 (GigabitEthernet1/0/2,177.0.1.105)-------(GigabitEthernet1/0/1,177.0.1.106)switch3

Firstly, I configure the SNMP protocol and LLDP protocol on three switches correctly.

Secondly, I use command snmp4sdn:readdb to read device information of the three switches, and the information is as follows:
MAC,IP,SNMP_Community,CLI_Username,CLI_Password
06:DF:44:64:01:00,177.0.0.104,public, ,
06:E4:80:8E:02:00,177.0.0.105,public, ,
78:74:6B:FE:03:00,177.0.1.106,public, ,

The result after executing this command is as follows:
MAC address (sid) IP address SNMP community CLI username CLI password
00:00:06:e4:80:8e:02:00 (7578479100416) 177.0.0.105 public
00:00:78:74:6b:fe:03:00 (132441423348480) 177.0.1.106 public
00:00:06:df:44:64:01:00 (7555994878208) 177.0.0.104 public

Thirdly, when I use command snmp4sdn:topodiscoverswitches to discovery the three switches, the error java.lang.NullPointerException occurs when executing this command.

2015-10-25 21:14:41,982 | ERROR | l for user karaf | ShellUtil | 25 - org.apache.karaf.shell.console - 3.0.3 | Exception caught while executing command
java.lang.NullPointerException
at org.opendaylight.snmp4sdn.internal.DiscoveryService.readLLDPonOneSwitch(DiscoveryService.java:1758)
at org.opendaylight.snmp4sdn.internal.DiscoveryService.readLLDPonSwitches(DiscoveryService.java:1777)
at org.opendaylight.snmp4sdn.internal.DiscoveryService.doEthSwDiscovery(DiscoveryService.java:1722)
at org.opendaylight.snmp4sdn.internal.InventoryServiceShim.doTopoDiscover(InventoryServiceShim.java:590)
at org.opendaylight.snmp4sdn.core.internal.Controller.topologyDiscoverEdges(Controller.java:482)
at org.opendaylight.snmp4sdn.core.internal.Controller.topoDiscover(Controller.java:373)
at Proxydb09afef_f7b9_4fc1_b2d9_5829eef9b60e.topoDiscover(Unknown Source)
at org.opendaylight.snmp4sdn.shell.TopoDiscoverSwitch.doExecute(TopoDiscoverSwitch.java:22)
at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.3]
at Proxy08dc5d78_0bd0_49cb_8ae2_b80fd7a0ac3b.execute(Unknown Source)[:]
at Proxy08dc5d78_0bd0_49cb_8ae2_b80fd7a0ac3b.execute(Unknown Source)[:]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:3.0.3]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_80]
at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[26:org.apache.karaf.jaas.modules:3.0.3]
at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[25:org.apache.karaf.shell.console:3.0.3]



 Comments   
Comment by Christine Hsieh [ 15/Feb/16 ]

Thank you. Different kinds of Port ID subtype will be supported in the future release. This limitation could be solved by referring to port ID subtype, or by vendor-specific support.

Comment by Nanfei Chen [ 19/Feb/16 ]

Yes, thank you, and I submitted a change in branch stable/lithium for this bug.

https://git.opendaylight.org/gerrit/#/c/32927/

Comment by Christine Hsieh [ 19/Feb/16 ]

Reviewed, please see the suggestion in the comment. Thank you.

Comment by Christine Hsieh [ 19/Feb/16 ]

By the way, I just recall that port ID subtype of interface name is supported now, see the gerrit 30120, https://git.opendaylight.org/gerrit/#/c/30120. This gerrit provide more robust functions and design, and it is introduced in Beryllium. However it is not cherry picked to Lithium SR, due to the patch includes some files which can't be introduced in Lithium.

Comment by Christine Hsieh [ 19/Feb/16 ]

By the way, I just recall that port ID subtype of interface name is supported now, see the gerrit 30120, https://git.opendaylight.org/gerrit/#/c/30120. This gerrit provide more robust functions and design, and it is introduced in Beryllium. However it is not cherry picked to Lithium SR, due to the patch includes some files which can't be introduced in Lithium, such as pom file.

Comment by Nanfei Chen [ 19/Feb/16 ]

OK, thanks. Pleanse see the reply, https://git.opendaylight.org/gerrit/#/c/32927/.

Comment by Nanfei Chen [ 19/Feb/16 ]

I have amended the change.

https://git.opendaylight.org/gerrit/#/c/32927/

Comment by Christine Hsieh [ 23/Feb/16 ]

Thanks for the patch, merged now.

Generated at Wed Feb 07 20:39:17 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.