On Thu, Oct 20, 2016 at 8:31 AM, Luis Sanabria-Russo
> After plugging strategic logger code at the suggested files' lines, I am 
> still unable to spot the problem.
>
> That is:
>
>     - OVS switch is indeed successful in establishing a connection to the 
> remote manager.
>
>     - I still get the wrong logger message at Ryu console. Who is receiving 
> the connection? Why I do not catch the event?


Just to confirm bolth the remote schema and the system_id was
discovered correct? Did the factory return a non-false app instance?


>
> The following is the OVS configuration:
>
> ovsdb-server    --remote=tcp:193.168.168.1:6640
>                          --pidfile --detach --no-chdir
> ovs-vsctl init
> ovs-vswitchd --pidfile --detach --no-chdir


So normally I don't start ovs manually like that, I don't think its
related, but I would recommend using the init scripts or systemd units
to get ovs started and make sure a local db exists before making the
remote connection with `set-manager`.


>
> -------------------------------------------------------
>
> Next, I paste the log information output to the screen from OVS:
>
> 2016-10-17T18:49:15Z|00002|reconnect|INFO|tcp:193.168.168.1:6640: 
> connecting...
> 2016-10-17T18:49:15Z|00003|reconnect|INFO|tcp:193.168.168.1:6640: connected
> ------------------------------------------------------
>
> As with the previous thread message, I get a the following from Ryu (@ 
> 193.168.168.1):
>
> loading app ovsdb_example.py
> loading app ryu.services.protocols.ovsdb.manager
> instantiating app ovsdb_example.py of MyApp
> instantiating app ryu.services.protocols.ovsdb.manager of OVSDB
> BRICK OVSDB
>   PROVIDES EventReadRequest TO {'OVSDB': set([])}
>   PROVIDES EventNewOVSDBConnection TO {'MyApp': set([])}
>   PROVIDES EventModifyRequest TO {'OVSDB': set([])}
>   CONSUMES EventReadRequest
>   CONSUMES EventModifyRequest
> BRICK MyApp
>   CONSUMES EventNewOVSDBConnection
> Listening on 0.0.0.0:6640 for clients
> New connection from 193.168.168.106:46874
> -----------------------------------------------------
>
> It does not seem to be rejecting or dropping the connection, nevertheless I 
> do not catch the event with the OVSDB manager library code provided in the 
> documentation. Any ideas?


I would sprinkle log messages throughout the RemoteOvsdb.factory and
its helper methods to isolate where its failing. Also running at debug
log level may help as that will trigger the python ovs vlog to log
copious amounts of stuff including the raw json rpc messages.

Another thing to try is to use the eventlet backdoor within your app
to see what's going on in process:

def start(self):
    super(MyApp, self).start()
    from eventlet import backdoor
    backdoor_socket = hub.listen(('127.0.0.1', 2222))
    backdoor_locals = {'m': self}
    t = hub.spawn(backdoor.backdoor_server, backdoor_socket,
                            backdoor_locals)
    self.threads.append(t)


Then you can telnet to localhost:2222 and be in process. Exiting from
this will exit from python, so make sure to just disconnect and not to
type 'exit' at the prompt ;).

Happy Hacking!

7-11

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to