It looks like ndb is listening (netstat shows this), but not receiving
anything (log is empty).
This looks like a connectivity issue.
Can the provider host ping the ovn host?
Is firewalld/iptables disabled on both hosts?

Let's make sure that OVN is working fine.
I attach a short python script that checks the connection from the
localhost.
Please check if it can connect to ovn from localhost (just execute this on
the host with ovn: "python tcp_connection_test.py" ).
It should connect and print out all the OVN networks.
Does this work?



On Mon, Apr 24, 2017 at 11:23 PM, Gianluca Cecchi <gianluca.cec...@gmail.com
> wrote:

>
> On Mon, Apr 24, 2017 at 10:03 PM, Marcin Mirecki <mmire...@redhat.com>
> wrote:
>
>> Looks like the south db works properly. The north db uses the same
>> mechanism, just a different schema and port.
>>
>> Looking at the netstat output it looks like ovn north db is not even
>> listening, or is there anything for 6641?
>>
>>
>>
>>
> Actually yes... it seems that the switch "-t" with the "-p" doesn't catch
> the 6641 and 6642 "LISTEN" lines, while if I use "-a" instead of "-t" I get
> them too...
>
> with "-a"
> root@ovmgr1 ~]# netstat -apn | grep 664
> tcp        0      0 0.0.0.0:6641            0.0.0.0:*
> LISTEN      6691/ovsdb-server
> tcp        0      0 0.0.0.0:6642            0.0.0.0:*
> LISTEN      6699/ovsdb-server
> tcp        0      0 10.4.192.43:6642        10.4.168.76:38882
> ESTABLISHED 6699/ovsdb-server
> tcp        0      0 10.4.192.43:6642        10.4.168.75:45486
> ESTABLISHED 6699/ovsdb-server
> tcp        0      0 10.4.192.43:6642        10.4.168.74:59176
> ESTABLISHED 6699/ovsdb-server
> unix  3      [ ]         STREAM     CONNECTED     14119
> 664/vmtoolsd
>
> with "-t"
> [root@ovmgr1 ~]# netstat -tpn | grep 664
> tcp        0      0 10.4.192.43:6642        10.4.168.76:38882
> ESTABLISHED 6699/ovsdb-server
> tcp        0      0 10.4.192.43:6642        10.4.168.75:45486
> ESTABLISHED 6699/ovsdb-server
> tcp        0      0 10.4.192.43:6642        10.4.168.74:59176
> ESTABLISHED 6699/ovsdb-server
>
>
>


-- 

MARCIN mIRECKI

Red Hat

<https://www.redhat.com>
<https://red.ht/sig>
"""

Code for testing ovs connection to OVN north DB
The north DB was configured with:
    ovn-nbctl set-connection ptcp:6641
"""

import time
import six

import ovs.db.idl


OVS_CONNECTION='tcp:127.0.0.1:6641'

OVN_NB_OVSSCHEMA_FILE = '/usr/share/openvswitch/ovn-nb.ovsschema'
NETWORK_TABLE_COLUMNS = ['name', 'ports', 'other_config', 'external_ids']
NETWORK_TABLE = 'Logical_Switch'


def get_schema_helper():
    schema_helper = ovs.db.idl.SchemaHelper(OVN_NB_OVSSCHEMA_FILE)
    schema_helper.register_columns(NETWORK_TABLE, NETWORK_TABLE_COLUMNS)
    return schema_helper

def get_networks(ovsdb_connection):
    rows = ovsdb_connection.tables['Logical_Switch'].rows
    for row in six.itervalues(rows):
        print('ROW: uuid:' + str(row.uuid) + '  name:' + str(row.name))

def connect():
    schema_helper=get_schema_helper()
    ovsdb_connection = ovs.db.idl.Idl(OVS_CONNECTION, schema_helper)

    i=1
    start = time.time()
    while (time.time() - start) < 30:
        ovsdb_connection.run()
        if ovsdb_connection.has_ever_connected():
            print('CONNECTED!')
            return ovsdb_connection
        print('connecting  ' + str(i) )
        i=i+1
        time.sleep(0.01)

    raise Exception('Failed to connect')

try:
    ovsdb_connection = connect()
    get_networks(ovsdb_connection)
except Exception as e:
    print('Exception' + str(e))
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to