Dear Yusuke,
Yes I consider your previous email regarding event sender and receiver and
frankly it was very useful for me.
However, I still have a problem with my data base synchronization script.
In fact, using eventlet this synchronization process block the execution of
my Ryu application (OpenFlow message exchange).
Thus, in order to sidestep this issue I am looking forward to execute Ryu
by a thread call as shown is the below code.
However, I am getting this error.
Please advise me how to initiate Ryu using thread call without using system
call (call(["/home/ubuntu/ryu/bin/ryu-manager",
"/home/ubuntu/Documents/simpleSwitchv2.py", "
/home/ubuntu/Documents/event_sender.py"]))
Thanks in advance.
Regards
-------
Code:
from subprocess import call
import thread
import time
from ryu.cmd.manager import *
#from bin import *
# Define a function for the 2nd thread
def print_time(threadName):
count = 0
delay = 3
while 1:#count < 5:
count += 1
print "%s: %s" % (threadName, time.ctime(time.time()) )
time.sleep(delay)
try:
thread1 = thread.start_new_thread( main,
("/home/ubuntu/Documents/simpleSwitchv0.py", ) )
thread2 = thread.start_new_thread( print_time, ("Thread-2", ) )
except:
print "Error: unable to start thread"
while 1:
pass
---------------------
Errors:
Thread-2: Mon Jan 11 15:10:48 2016
loading app /
Unhandled exception in thread started by <function main at 0x7ff8f5bda230>
Traceback (most recent call last):
File "/home/ubuntu/ryu/ryu/cmd/manager.py", line 88, in main
app_mgr.load_apps(app_lists)
File "/home/ubuntu/ryu/ryu/base/app_manager.py", line 574, in load_apps
cls = self.load_app(app_cls_name)
File "/home/ubuntu/ryu/ryu/base/app_manager.py", line 550, in load_app
mod = utils.import_module(name)
File "/home/ubuntu/ryu/ryu/utils.py", line 91, in import_module
__import__(name)
ValueError: Empty module name
Thread-2: Mon Jan 11 15:10:51 2016
^CTraceback (most recent call last):
File "callRyu.py", line 37, in <module>
pass
KeyboardInterrupt
2016-01-15 1:29 GMT+01:00 Yusuke Iwase <[email protected]>:
> Hi David,
>
> For defining "User Event", the following post may be helpful.
>
> http://sourceforge.net/p/ryu/mailman/ryu-devel/thread/5694B058.7090004%40gmail.com/#msg34758419
>
> Thanks,
> Iwase
>
>
> On 2016年01月10日 18:26, David Gabriel wrote:
> > Dera Fujita and all,
> >
> > Please tell me where is the suitable place to initiate my event.
> > Please note that I am using ldap as data base.
> >
> > Thanks in advance.
> > Best regards
> >
> > 2016-01-07 16:17 GMT+01:00 FUJITA Tomonori <[email protected] <mailto:
> [email protected]>>:
> >
> > On Wed, 6 Jan 2016 03:26:09 -0800
> > David Gabriel <[email protected] <mailto:[email protected]>>
> wrote:
> >
> > > I want to run an application that depends on:
> > > 1- openflow events (like simple switch app you provide in the
> tutorial) and
> > > also
> > > 2- external events (provided by an external Data Base - DB).
> > > In fact, I have a python scirpt that periodacally check my data
> base to get
> > > new modification. I am wondering how can I integrate it in my Ryu
> > > application in order to be updated from my data base and
> consequently
> > > change the behaviour of my ovs switch ?
> > > I want to run only one application (one source file) because there
> some
> > > variables to be shared and I want to know how to integrate my
> source code
> > > (that gets the DB update) into my Ryu application (that is very
> closed to
> > > simple_switch.py) ?
> >
> > I think that you need to access to the DB in an eventlet-compatible
> > way. Try Google with a keyword like "eventlet sql".
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Site24x7 APM Insight: Get Deep Visibility into Application Performance
> > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> > Monitor end-to-end web transactions and take corrective actions now
> > Troubleshoot faster and improve end-user experience. Signup Now!
> > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> >
> >
> >
> > _______________________________________________
> > Ryu-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ryu-devel
> >
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel