[OVSDB-131] Cannot use the connection manager north bound API to connect to OVSDB nodes on Mininet Created: 01/Dec/14  Updated: 19/Oct/17  Resolved: 23/Dec/14

Status: Resolved
Project: ovsdb
Component/s: Northbound
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Ramkumar Gowrishankar Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File karaf.log    
External issue ID: 2455

 Description   

This issue is seen with Helium and Heium-SR1.
Enable the following features:
odl-openflowplugin-all
odl-ovsdb-all
odl-restconf

Check that the odl-adsal-northbound feature is up and running and this feature contains the connection manager using feature:info odl-adsal-northbound

Start a mininet session:
sudo mn --controller=remote,ip=127.0.0.1 --topo linear,2 --switch ovsk,protocols=OpenFlow13

Run the command:sudo ovs-vsctl show to see that the Openflow module is connected to the controller but the ovsdb portion is not.

1c66647f-f231-49b3-aa1a-7e35ffa2da49
Bridge "s1"
Controller "ptcp:6634"
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
Port "s1-eth1"
Interface "s1-eth1"
Port "s1"
Interface "s1"
type: internal
Port "s1-eth2"
Interface "s1-eth2"
Bridge "s2"
Controller "tcp:127.0.0.1:6633"
is_connected: true
Controller "ptcp:6635"
fail_mode: secure
Port "s2-eth2"
Interface "s2-eth2"
Port "s2-eth1"
Interface "s2-eth1"
Port "s2"
Interface "s2"
type: internal
ovs_version: "1.11.0"

Now if you try to do a PUT to the following URL: http://localhost:8080/controller/nb/v2/connectionmanager/node/HOST1/address/127.0.0.1/port/6634/ it is supposed to connect to the OVSDB schema on the switch. It does not give a response and does not time out and there is nothing in the logs to indicate that the message is being processed.
I am using
https://wiki.opendaylight.org/view/OVSDB_Integration:Mininet_OVSDB_Tutorial
https://wiki.opendaylight.org/view/OVSDB:Helium_and_Openstack_on_Fedora20
https://www.youtube.com/watch?v=xgevyaQ12cg
as references.



 Comments   
Comment by Ramkumar Gowrishankar [ 01/Dec/14 ]

Attachment karaf.log has been added with description: karaf.log from the test.

Comment by Tony Tkacik [ 15/Dec/14 ]

Description seems to be related to OVSDB. Moving to OVSDB project, where maintainers are more familiar with use case and will be able to provide more details.

Comment by Flavio Fernandes [ 23/Dec/14 ]

Ramkumar:

If you are using odl and ovs in the same system, you need to take
extra care so the ovs instance and odl do not end up stepping on each other's
toes. In a nutshell, make sure you change the following port in the karaf
config to something other than 6640.

etc/custom.properties:ovsdb.listenPort=6640

Then, you should use the following url to connect to the ovsdb port of
ovs:

http://localhost:8080/controller/nb/v2/connectionmanager/node/HOST1/address/127.0.0.1/port/6640/

Comment by Flavio Fernandes [ 23/Dec/14 ]

Just to be clear, this is the exact command I used and that worked fine.

In this example, instead of changing the odl config (comment #3),
I changed OVS to listed for ovsdb on port 6666.

export ODL_IP=127.0.0.1
export OVS_IP=127.0.0.1
export OVS_PORT=6666

In the system where OVS is running:

$ sudo ovs-vsctl set-manager ptcp:6666
$ sudo ovs-vsctl show

In the system where ODL is running:

$ wget --user=admin --password=admin -O - --method=PUT http://${ODL_IP}:8080/controller/nb/v2/connectionmanager/node/HOST1/address/${OVS_IP}/port/${OVS_PORT}/

======

$ sudo ovs-vsctl show
9d59bf51-e986-4cd6-be46-ebd5dc564437
Manager "ptcp:6666" <--- passive tcp connection
is_connected: true <--- connected

Generated at Wed Feb 07 20:35:35 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.