Hi Team,

I have installed networking-sfc in Mitaka and trying to create port-pair and 
flow-classifier.
But both are failing with the below errors.
In the setup, devstack is connected to ODL controller (stable/oxygen)
Could you please help in analysing the issue.?

Networking-sfc installation steps
-------------------------------------------
sudo pip install -c 
https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=mitaka-eol
 networking-sfc==2.0.0

Edited local.conf with below information


        [DEFAULT]

        service_plugins = flow_classifier,sfc

        [sfc]

        drivers = ovs

        [flowclassifier]

        drivers = ovs

Restarted q-svc
screen -r
Move to q-svc
Ctrl+c and then restarted .

neutron-db-manage --subproject networking-sfc upgrade head

Openstack commands
----------------------------
neutron net-create net1
neutron subnet-create net1 20.0.0.0/24 --name subnet1
neutron port-create --name p1 net1
neutron port-create --name p2 net1
neutron port-create --name p3 net1
neutron port-create --name p4 net1
neutron port-create --name p5 net1
neutron port-create --name p6 net1
openstack server create --flavor m1.tiny --image $(glance image-list | grep -v 
'kernel' | grep -v 'ramdisk' | grep 'cirros-0.3.4' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp1' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp2' |awk '{print $2}') vm1
openstack server create --flavor m1.tiny --image $(glance image-list | grep -v 
'kernel' | grep -v 'ramdisk' | grep 'cirros-0.3.4' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp3' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp4' |awk '{print $2}') vm2
openstack server create --flavor m1.tiny --image $(glance image-list | grep -v 
'kernel' | grep -v 'ramdisk' | grep 'cirros-0.3.4' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp5' |awk '{print $2}') --nic 
port-id=$(neutron port-list |grep '\sp6' |awk '{print $2}') vm3
neutron flow-classifier-create --description "HTTP traffic from 192.168.1.11 to 
192.168.2.11" --ethertype IPv4 --source-ip-prefix 192.168.1.11/32 
--destination-ip-prefix 192.168.2.11/32 --protocol tcp --source-port 1000:1000 
--destination-port 80:80 FC1
neutron port-pair-create   --description "Firewall SF instance 1"   --ingress 
p1   --egress p2 PP1


Error details flow-classifier-create
-----------------------------------------
2018-04-05 08:47:57.015 DEBUG 
networking_sfc.services.flowclassifier.drivers.ovs.driver 
[req-973a9df3-e6a9-4a78-9c9b-baebb9f1a7c8 admin 
b38d4698dbdc4583921e1b360496d7f1] 
networking_sfc.services.flowclassifier.drivers.ovs.driver.OVSFlowClassifierDriver
 method create_flow_classifier_precommit called with arguments 
(<networking_sfc.services.flowclassifier.common.context.FlowClassifierContext 
object at 0x7f7e6524b050>,) {} from (pid=25949) wrapper 
/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py:45
2018-04-05 08:47:57.015 ERROR 
networking_sfc.services.flowclassifier.driver_manager 
[req-973a9df3-e6a9-4a78-9c9b-baebb9f1a7c8 admin 
b38d4698dbdc4583921e1b360496d7f1] FlowClassifier 
cd8fa7c9-ed8a-4c3b-8a4c-8d37c3ecb467 does not set logical source port in ovs 
driver
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager Traceback (most recent 
call last):
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager   File 
"/usr/local/lib/python2.7/dist-packages/networking_sfc/services/flowclassifier/driver_manager.py",
 line 81, in _call_drivers
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager     getattr(driver.obj, 
method_name)(context)
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager   File 
"/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 46, in 
wrapper
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager     return method(*args, 
**kwargs)
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager   File 
"/usr/local/lib/python2.7/dist-packages/networking_sfc/services/flowclassifier/drivers/ovs/driver.py",
 line 51, in create_flow_classifier_precommit
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager     'logical source port 
in ovs driver' % flow_classifier['id']))
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager FlowClassifierBadRequest: 
FlowClassifier cd8fa7c9-ed8a-4c3b-8a4c-8d37c3ecb467 does not set logical source 
port in ovs driver
2018-04-05 08:47:57.015 TRACE 
networking_sfc.services.flowclassifier.driver_manager
2018-04-05 08:47:57.016 ERROR 
networking_sfc.services.flowclassifier.driver_manager 
[req-973a9df3-e6a9-4a78-9c9b-baebb9f1a7c8 admin 
b38d4698dbdc4583921e1b360496d7f1] Flow Classifier driver 'ovs' failed in 
create_flow_classifier_precommit
2018-04-05 08:47:57.028 INFO neutron.api.v2.resource 
[req-973a9df3-e6a9-4a78-9c9b-baebb9f1a7c8 admin 
b38d4698dbdc4583921e1b360496d7f1] create failed (client error): FlowClassifier 
cd8fa7c9-ed8a-4c3b-8a4c-8d37c3ecb467 does not set logical source port in ovs 
driver

Error details during flow-classifier-create
-----------------------------------------
2018-04-05 08:41:26.613 DEBUG neutron.plugins.ml2.drivers.type_tunnel 
[req-1976ec16-98ed-44f5-88e5-92c39f2d054d admin 
b38d4698dbdc4583921e1b360496d7f1] get_endpoint_by_host() called for host 
u14-bgpvpn-ctrl-mitaka from (pid=25948) get_endpoint_by_host 
/opt/stack/neutron/neutron/plugins/ml2/drivers/type_tunnel.py:263
2018-04-05 08:41:26.617 ERROR oslo_db.sqlalchemy.exc_filters 
[req-1976ec16-98ed-44f5-88e5-92c39f2d054d admin 
b38d4698dbdc4583921e1b360496d7f1] DBAPIError exception wrapped from 
(pymysql.err.IntegrityError) (1048, u"Column 'local_endpoint' cannot be null") 
[SQL: u'INSERT INTO sfc_portpair_details (tenant_id, id, ingress, egress, 
host_id, mac_address, network_type, segment_id, local_endpoint) VALUES 
(%(tenant_id)s, %(id)s, %(ingress)s, %(egress)s, %(host_id)s, %(mac_address)s, 
%(network_type)s, %(segment_id)s, %(local_endpoint)s)'] [parameters: 
{'ingress': u'6b9f49e6-e1f1-4211-b449-bef7bc4d5b42', 'segment_id': 1038, 
'tenant_id': u'b38d4698dbdc4583921e1b360496d7f1', 'id': 
'fa49ed60-e1f1-4b47-b39a-429c0fe28e55', 'local_endpoint': None, 'egress': 
u'd16e85a8-6cc0-450d-b0ab-f44d5c1c874d', 'mac_address': u'fa:16:3e:a0:d2:07', 
'host_id': u'u14-bgpvpn-ctrl-mitaka', 'network_type': u'vxlan'}]
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most 
recent call last):
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, 
in _execute_context
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     context)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 
450, in do_execute
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     
cursor.execute(statement, parameters)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 158, in 
execute
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     result = 
self._query(query)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 308, in _query
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     conn.query(q)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 820, in 
query
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1002, in 
_read_query_result
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     result.read()
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1285, in 
read
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     first_packet = 
self.connection._read_packet()
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 966, in 
_read_packet
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     
packet.check_error()
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in 
check_error
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     
err.raise_mysql_exception(self._data)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 120, in 
raise_mysql_exception
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     
_check_mysql_exception(errinfo)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 112, in 
_check_mysql_exception
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters     raise 
errorclass(errno, errorvalue)
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters IntegrityError: 
(1048, u"Column 'local_endpoint' cannot be null")
2018-04-05 08:41:26.617 TRACE oslo_db.sqlalchemy.exc_filters


Ovs output
-----------------
stack@u14-bgpvpn-ctrl-mitaka:~$ sudo ovs-vsctl show

62c67e9c-4e1e-4a29-8b7d-d6228ffd4ed9
    Manager "tcp:192.168.56.1:6640"
        is_connected: true
    Bridge br-int
        Controller "tcp:192.168.56.1:6653"
            is_connected: true
        Controller "tcp:192.168.56.1:6633"
        Port "tap6b9f49e6-e1"
            Interface "tap6b9f49e6-e1"
        Port "tunb2b1b9555cf"
            Interface "tunb2b1b9555cf"
                type: vxlan
                options: {key=flow, local_ip="192.168.56.101", 
remote_ip="192.168.56.105"}
        Port "tap3511da2f-f4"
            Interface "tap3511da2f-f4"
        Port "tap6ef49da1-49"
            Interface "tap6ef49da1-49"
        Port br-int
            Interface br-int
                type: internal
        Port "tap29795090-0c"
            Interface "tap29795090-0c"
        Port "tapd16e85a8-6c"
            Interface "tapd16e85a8-6c"
        Port "tap44a380f7-73"
            Interface "tap44a380f7-73"
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
    Bridge bt
        Port bt
            Interface bt
                type: internal
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
    ovs_version: "2.5.0"


stack@u14-bgpvpn-ctrl-mitaka:~$ sudo ovs-ofctl show br-int
OFPT_FEATURES_REPLY (xid=0x2): dpid:00006eec0b14cf47
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src 
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
3(tap6b9f49e6-e1): addr:fe:16:3e:a0:d2:07
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
4(tapd16e85a8-6c): addr:fe:16:3e:35:f1:75
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
5(tap44a380f7-73): addr:fe:16:3e:46:4a:85
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
6(tap3511da2f-f4): addr:fe:16:3e:94:7d:07
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
7(tap6ef49da1-49): addr:fe:16:3e:9b:79:65
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
8(tap29795090-0c): addr:fe:16:3e:cb:1f:00
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
10(tunb2b1b9555cf): addr:ae:ce:67:e7:55:7f
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
LOCAL(br-int): addr:6e:ec:0b:14:cf:47
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

Thanks,
Manu


_______________________________________________
sfc-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/sfc-dev

Reply via email to