Re: Error running ODL tests!


gopan.govindan@...
 

Thanks Arash. Happy to note that there are pass results.
Thanks Sudheer for addressing this.

On 2014-05-23 10:15, Arash Eghtesadi wrote:
Hello Sudheer, 
Thank you very much for your attention.
In fact, I succeeded to run the tests and 22 out of 33 passed. I used
the default automatic run of Mininet and OpenDaylight. 
Since in my setting, the Mininet is running in a VM, and the
controller is running in my host machine, I commented the following
lines since in the odldriver.py script:
            main.log.info [1]("Clearing any residual state or
processes")
            result = self.execute(cmd="sudo mn
-c",timeout=30,prompt="password")
            pattern = '[sudo]'
            if
utilities.assert_matches(expect=pattern,actual=result,onpass="password
is being asked",onfail="password is not being asked"):
               
self.execute(cmd=self.pwd,prompt="$",timeout=30) 
            else :
                main.log.info [1]("password is not being
asked")
                pass
as well as:
            main.log.info [1]("setting JAVA home")
            result = self.execute(cmd="export
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386",prompt="$",timeout=10)#Enter
Default JDK Package
and modified this lineto the path of my odl controller:
self.execute(cmd="cd
controller/opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage/opendaylight",timeout=10,prompt="$")
The result I get is the following:
*************************************
Test Execution Summary
************************************* 
 Test Start           : 23 May 2014 10:20:03
 Test End             : 23 May 2014 10:22:16
 Execution Time       : 0:02:13.037778
 Total tests planned  : 33
 Total tests RUN      : 33
 Total Pass           : 22
 Total Fail           : 11
 Total No Result      : 0
 Success Percentage   : 66%
 Execution Result     : 100%
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 808, in
__bootstrap_inner
    self.run()
  File "./cli.py", line 568, in run
    result = self.test_on.cleanup()
  File "../core/teston.py", line 281, in cleanup
    utilities.send_mail()
  File "../core/utilities.py", line 248, in send_mail
    smtp = smtplib.SMTP('HostName/IP Adress')
  File "/usr/lib/python2.7/smtplib.py", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 311, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python2.7/smtplib.py", line 286, in _get_socket
    return socket.create_connection((host, port), timeout)
  File "/usr/lib/python2.7/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
I am not sure why that exception happens. Your advise is highly
appreciated.
Best regards, 
Arash
On Fri, May 23, 2014 at 2:45 AM, Sudheer-570
<sudheer@...> wrote:

HI Arash,
Getting error because of opendaylight controller may not listening
on any 6633 port. It will cause no communication between mininet and
opendaylight controller.
We don't want to execute opendaylight-controller and mininet
manually, We were automated mininet and opendaylight controller
start-ups in driver scripts. 
Odl.topo:
 Add below mention fileds in Mininet1 Components
  <ip> opendaylight controller running host ip </ip>
  <port>6633</port>
 ERROR - getting topology failed because of<type
'exceptions.TypeError'>
 Its occurring when we try to remove the container and userlink
etc... Because of container and userlink etc.. are not added to the
controller.
I assume the error is because of that and the fact that I already
run Mininet and Opendaylight controller prior to running the tests.
Do you have any suggestion on how to deal with this issue, and
stopping the automatic run of Mininet and ODL.
 For the above issues please follow the steps as mentioned below.
1) Remove testcase 1 in  Odl.params file
2) Remove Mininet1 Component in Odl.topo
3) Comment below mention script in connect definition inside the
odldriver.py file
    
main.log.info("Getting OpenDayLight Controller")
self.execute(cmd="cd opendaylight",timeout=10,prompt="$")
main.log.info("setting JAVA home")
result = self.execute(cmd="export JAVA_HOME=/usr/lib/
jvm/java-1.7.0-openjdk-i386",prompt="$",timeout=10)#Enter Default
JDK Package
main.log.info("Running opendaylight controller")
result = self.execute(cmd="./run.sh",prompt="Statistics Provider
started.",timeout=300)
result = self.execute(cmd="ss",prompt="Framework is
launched.",timeout=10)
pattern='Framework'
if
utilities.assert_matches(expect=pattern,actual=result,onpass="OpenDayLight
Controller is Running",onfail="Failed to run Opendaylight
controller"):
try :
main.log.info("Connecting to topology url")
urllib.urlopen(self.options['topology_url'])
main.log.info("Connection authentication for restapi")
self.auth =
HTTPBasicAuth(self.options['username'],self.options['password'])
except Exception,e:
main.log.error(e)
                  
   
Please try with this steps.
If you are still facing any issues after execution of these steps.
will arrange a live debugging session on 26-may-2014 at 9:30AM
(EST).
Regards,
Sudheer
On 5/22/2014 8:57 PM, Arash Eghtesadi wrote:

Hello, 
Thank you very much for your time and the session this morning.
I got the new version from github and succeeded to run them.
However running the ODL test, almost all of them fail giving the
bellow error:
 ERROR - getting topology failed because of<type
'exceptions.TypeError'>
What I observe in the log is that when I execute run MyTest, it
actually try to run Mininet and OpenDaylight controller (cd
opendaylight, then ./run.sh, etc). 
I assume the error is because of that and the fact that I already
run Mininet and Opendaylight controller prior to running the
tests. Do you have any suggestion on how to deal with this issue,
and stopping the automatic run of Mininet and ODL.
Best regards,
 
--
Arash Eghtesadi
Software Developer
Inocybe Technologies Inc.
Montreal, QC, Canada
--
Arash Eghtesadi
Software Developer
Inocybe Technologies Inc.
Montreal, QC, Canada
Links:
------
[1] http://main.log.info

Join {integration-dev@lists.opendaylight.org to automatically receive all group messages.