I might have found the problem... Not in OVS.
/usr/lib/python3.8/site-packages/ryu/services/protocols/ovsdb/client.py:
...
# NOTE(jkoelker) Wrap ovs's Idl to accept an existing session, and
# trigger callbacks on changes
class Idl(idl.Idl):
def __init__(self, session, schema):
if not isinstance(schema, idl.SchemaHelper):
schema = idl.SchemaHelper(schema_json=schema)
schema.register_all()
...
I didn't analyze much but they don't call super() for some reasons and
obviously are not in sync with the private attributes from the latest
python ovs...
Cheers,
Jonathan
On Tue, Jun 22, 2021 at 5:42 PM Jonathan Fournier <
[email protected]> wrote:
> Hi,
>
> I'm using ovs-vswitchd (Open vSwitch) 2.13.3 (latest LTS) and the latest
> git clone of Ryu from https://github.com/faucetsdn/ryu, when installing
> Ryu it has a python dependency on ovs 2.13.3 so I assume the ovs python
> package installed is matching the OVS version I'm using.
>
> I'm trying to use Ryu as the OVSDB manager from a basic empty setup, the
> example from this page:
> https://ryu.readthedocs.io/en/latest/library_ovsdb_manager.html.
>
> I'm starting OVS this way:
>
> # ovs-ctl start --system-id=random --delete-bridges
> # ovs-vsctl set-manager tcp:127.0.0.1:6640
>
> Inside my Ryu application I'm getting an exception after receiving the
> connection from OVS:
>
> New connection from 127.0.0.1:46354
> hub: uncaught exception: Traceback (most recent call last):
> File "/usr/lib/python3.8/site-packages/ryu/lib/hub.py", line 60, in
> _launch
> return func(*args, **kwargs)
> File
> "/usr/lib/python3.8/site-packages/ryu/services/protocols/ovsdb/manager.py",
> line 145, in _start_remote
> app = client.RemoteOvsdb.factory(sock, client_address,
> File
> "/usr/lib/python3.8/site-packages/ryu/services/protocols/ovsdb/client.py",
> line 325, in factory
> system_id = discover_system_id(idl)
> File
> "/usr/lib/python3.8/site-packages/ryu/services/protocols/ovsdb/client.py",
> line 126, in discover_system_id
> idl.run()
> File "/usr/lib/python3.8/site-packages/ovs/db/idl.py", line 256, in run
> self.__send_server_schema_request()
>
>
> * File "/usr/lib/python3.8/site-packages/ovs/db/idl.py", line 583, in
> __send_server_schema_request "get_schema", [self._server_db_name,
> str(self.uuid)])AttributeError: 'Idl' object has no attribute
> '_server_db_name'*
>
> I don't know much about all of this IDL stuff but the Idl class from
> ovs/db/idl.py can't find an attribute that is defined inside the __init__()
> (https://github.com/openvswitch/ovs/search?q=_server_db_name)
>
> I don't know who else might be manipulating this object but even knowing
> it wouldn't be working I tried to just redefine self._server_db_name =
> '_Server'
> inside __send_server_schema_request(), but then it keeps blowing up on
> other attributes like self._server_db_table = 'Database'...
>
> Something I've done wrong? I've tried a different order of startup (e.g.
> Ryu manager before and after OVS), it's always blowing up after the
> connection event.
>
> Cheers,
>
> Jonathan
>
>
>
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss