[NETVIRT-514] QosInterfaceStateChangeListener: java.lang.IllegalArgumentException Created: 07/Mar/17 Updated: 30/Oct/17 Resolved: 30/Mar/17 |
|
| Status: | Resolved |
| Project: | netvirt |
| Component/s: | General |
| Affects Version/s: | Carbon |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Janki Chhatbar | Assignee: | Vamsi krishna |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 7913 | ||||||||
| Description |
|
2017-03-06 15:58:07,231 | INFO | pool-53-thread-1 | NeutronvpnManager | 370 - org.opendaylight.netvirt.neutronvpn-impl - 0.4.0.SNAPSHOT | Creating vpn interface VpnInterface [_key=VpnInterfaceKey [_name=79979446175186:br-physnet1-pa:flat], _name=79979446175186:br-physnet1-pa:flat, _vpnInstanceName=023a3b1a-e4a9-4a32-b985-08890eca2d61, _isRouterInterface=false, augmentation=[]] at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[65:com.google.guava:18.0.0] at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid.<init>(Uuid.java:55)[81:org.opendaylight.mdsal.model.ietf-yang-types-20130715:2013.7.15.10-SNAPSHOT] at org.opendaylight.netvirt.qosservice.QosInterfaceStateChangeListener.add(QosInterfaceStateChangeListener.java:68)[377:org.opendaylight.netvirt.qosservice-impl:0.4.0.SNAPSHOT] at org.opendaylight.netvirt.qosservice.QosInterfaceStateChangeListener.add(QosInterfaceStateChangeListener.java:31)[377:org.opendaylight.netvirt.qosservice-impl:0.4.0.SNAPSHOT] at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:143)[328:org.opendaylight.genius.mdsalutil-api:0.2.0.SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121] at java.lang.Thread.run(Thread.java:745)[:1.8.0_121] 2017-03-06 15:58:07,237 | INFO | nPool-1-worker-1 | sedEgressServicesStateBindHelper | 358 - org.opendaylight.genius.interfacemanager-impl - 0.2.0.SNAPSHOT | bind all egress services for vlan port: 198622229657920:br-physnet1-pa:flat 2017-03-06 15:58:07,237 | ERROR | pool-53-thread-1 | QosInterfaceStateChangeListener | 377 - org.opendaylight.netvirt.qosservice-impl - 0.4.0.SNAPSHOT | Qos:Exception caught in Interface Operational State Up event java.lang.IllegalArgumentException: Supplied value "52979261036746:br-physnet1-pa:flat" does not match required pattern "^[0-9a-fA-F]{8} -[0-9a-fA-F] {4}-[0-9a-fA-F]{4}-[0-9a-fA-F] {4}-[0-9a-fA-F] {12}$" |
| Comments |
| Comment by Michael Vorburger [ 08/Mar/17 ] |
|
I've just hit this too, while starting to learn OpenStack with OpenDaylight using my https://github.com/vorburger/openstack-devstack-opendaylight-vagrant/ .. The message a slightly different in my case, but basically same problem: Supplied value "tap61d7aec1-2c" does not match required pattern ... I've had a quick look at the code in QosInterfaceStateChangeListener.add, and basically that code assumes that it can do new Uuid(Interface.getName()) which is most probably wrong - Interface.getName() clearly is NOT, always, guaranteed, to be a valid UUID (above it's "198622229657920:br-physnet1-pa:flat", in my case it's "tap61d7aec1-2c") .. Obviously I don't understand anything of this code, but I do see that INeutronVpnManager's Port getNeutronPort(Uuid portId) has an alternative Port getNeutronPort(String name) variant - should that be used instead? Is that "name" an Interface.getName() ? Or could you get the UUID from the Interface's getPhysAddress(), somehow? PS: In general, these kind of conversions to String are a bad idea .. ideally, everything should be "strongly typed" - should INeutronVpnManager perhaps directly have a getNeutronPort taken an Interface arg? |
| Comment by Michael Vorburger [ 09/Mar/17 ] |
|
> INeutronVpnManager's Port getNeutronPort(Uuid portId) has an alternative Port > getNeutronPort(String name) variant - should that be used instead? no that was a stupid idea - org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.getNeutronPort(String) internally just does a new Uuid(name), so this would not solve the problem. > Or could you get the UUID from the Interface's getPhysAddress(), somehow? that's probably the right fix here - but how to you obtain that UUID from an Interface? |
| Comment by Janki Chhatbar [ 10/Mar/17 ] |
| Comment by Michael Vorburger [ 15/Mar/17 ] |
|
Possible future enhancement (not short term) resulting from this code in https://git.opendaylight.org/gerrit/#/c/53363/ & |
| Comment by Sam Hague [ 28/Mar/17 ] |
|
Could you cherry-pick this fix to stable/boron also? |
| Comment by Michael Vorburger [ 28/Mar/17 ] |
|
> Could you cherry-pick this fix to stable/boron also? ==> https://git.opendaylight.org/gerrit/#/c/53975/ It was more of a "manual reconstruct" than an actual simple technical git cherry-pick, as (apparently) the code has moved to another bundle (vpnservice/qosservice VS vpnservice/neutronvpn/neutronvpn-impl), and looked quite different in stable/boron, you may want to carefully review c/53975 ... |