[CONTROLLER-663] java.lang.IllegalArgumentException: 'Ipv4Address [_value=<ADDR>]' is not an IP string literal. Created: 06/Aug/14  Updated: 13/Aug/14  Due: 13/Aug/14  Resolved: 13/Aug/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Flavio Fernandes Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: PC


External issue ID: 1492

 Description   

$ cat version.properties
org.opendaylight.controller.version = 0.1
org.opendaylight.controller.build.scm.version = 46751de4454b9a6f5cf73db39f90f0189ceae986
org.opendaylight.controller.build.user = jenkins-controller
org.opendaylight.controller.build.workspace = **********
org.opendaylight.controller.build.timestamp = 1407328368149
org.opendaylight.controller.build.machine = **********

It seems there may be a bug in the sal compatability layer
which isn't converting the Ipv4Address to an ip address

Whole log: https://gist.github.com/anonymous/119bdf3d7204ba87bcfa

2014-08-06 12:09:56.727 EDT [md-sal-binding-notification-211] ERROR o.o.c.sal.binding.impl.NotifyTask - Unhandled exception thrown by listener: org.opendaylight.controller.sal\
.compatibility.FlowProgrammerAdapter$$Broker$ListenerInvoker@17764fe1
java.lang.IllegalArgumentException: 'Ipv4Address [_value=10.210.2.1]' is not an IP string literal.
at com.google.common.net.InetAddresses.forString(InetAddresses.java:153) ~[na:na]
at org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.inetAddressFrom(ToSalConversionsUtils.java:605) ~[na:na]
at org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.fillFromIpv4(ToSalConversionsUtils.java:598) ~[na:na]
at org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.fillFrom(ToSalConversionsUtils.java:550) ~[na:na]
at org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.toMatch(ToSalConversionsUtils.java:402) ~[na:na]
at org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.toFlow(ToSalConversionsUtils.java:157) ~[na:na]
at org.opendaylight.controller.sal.compatibility.FlowProgrammerAdapter.onSwitchFlowRemoved(FlowProgrammerAdapter.java:212) ~[na:na]
at org.opendaylight.controller.sal.compatibility.FlowProgrammerAdapter$$Broker$ListenerInvoker.onNotification(FlowProgrammerAdapter$$Broker$ListenerInvoker.java) ~[na:\
na]
at org.opendaylight.controller.sal.binding.impl.AbstractNotificationListenerRegistration.notify(AbstractNotificationListenerRegistration.java:38) ~[na:na]
at org.opendaylight.controller.sal.binding.impl.NotifyTask.run(NotifyTask.java:42) ~[na:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]



 Comments   
Comment by Jan Hajnar [ 12/Aug/14 ]

Can you please provide more info about what steps need to be taken to reproduce these errors? Some detailed info about your setup and what exactly are you doing before these errors appear would be helpful. The problem seems to be badly created Ipv4Prefix object (IP address String value created from Ipv4Address object by invoking toString() on it). Exception you see is not result of bug in sal capability layer.

Comment by Flavio Fernandes [ 13/Aug/14 ]

Jan:

To reproduce this bug, I used openStack and ran the attached script below.

Ref to the openStack nodes used is here:
http://potofjoy.com/flavioBlog/work/how-to-openstack-with-floating-ips.html

Alternatively, here is a Vagrant file that would work as well:
https://github.com/opendaylight/ovsdb/blob/master/Vagrantfile

From there, I 'stacked' on all nodes and ran this script from the control node:
https://gist.github.com/1ba897e7cde8dbd87fe8

If you look at the complete log of the run, this bug happens at line 1127:
https://gist.github.com/anonymous/06238ef4fc4dbf19427d#file-gistify319118-txt-L1127

Hope this helps! Like you said, it is likely a code path that assembled the
flow improperly. I fail to know what/where that is, but I also hope that given
the complete log you may have a better way of finding out.

Thanks,

– flavio

Comment by Jan Hajnar [ 13/Aug/14 ]

Thanks for the info I was finally able to reproduce it.

fix:
https://git.opendaylight.org/gerrit/#/c/9924/

Generated at Wed Feb 07 19:53:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.