Comment 5 for bug 1681979

Revision history for this message
yangjianfeng (1912294464-o) wrote :

I also encountered the similar problem.
I found a logic error after browse neutron code:

    def notify_l2pop_port_wiring(self, port_id, rpc_context,
                                 status, host):
        ......
        # NOTE: DVR ports are already handled and updated through l2pop
        # and so we don't need to update it again here
        if port['device_owner'] == n_const.DEVICE_OWNER_DVR_INTERFACE:
            return
        ......
But the DVR port did not handle and updated when I restart neutron-openvswitch-agent

    def _update_individual_port_db_status(self, context, port, status, host):
        ......
        if updated:
            self.mechanism_manager.update_port_postcommit(mech_context)
        ......
Beacuse the "updated" value is "false" when restart neutron-openvswitch-agent.So,the "update_port_postcommit" and "update_port_up" will not be called.So In compute node when there is only DVR port on one network the flood flow of the network will not be set.

Before I restart neutron-openvswitch-agent:
 cookie=0x3c125494667e2cef, duration=4931.840s, table=21, n_packets=8895, n_bytes=373590, idle_age=3, priority=0 actions=resubmit(,22)
 cookie=0x3c125494667e2cef, duration=4928.110s, table=22, n_packets=0, n_bytes=0, idle_age=65534, priority=1,dl_vlan=4 actions=strip_vlan,load:0x44->NXM_NX_TUN_ID[],output:6,output:7
 cookie=0x3c125494667e2cef, duration=4926.851s, table=22, n_packets=0, n_bytes=0, idle_age=65534, priority=1,dl_vlan=3 actions=strip_vlan,load:0x35->NXM_NX_TUN_ID[],output:6,output:7
 cookie=0x3c125494667e2cef, duration=6.136s, table=22, n_packets=8, n_bytes=608, idle_age=3, priority=1,dl_vlan=1 actions=strip_vlan,load:0x20->NXM_NX_TUN_ID[],output:6,output:7
 cookie=0x3c125494667e2cef, duration=4931.838s, table=22, n_packets=162, n_bytes=13348, idle_age=7, priority=0 actions=drop

After I restart neutron-openvswitch-agent(The flood flow of "dl_vlan=1" is missing):
 cookie=0xf0733c083d3dceb, duration=14.084s, table=21, n_packets=8895, n_bytes=373590, idle_age=202, priority=0 actions=resubmit(,22)
 cookie=0xf0733c083d3dceb, duration=10.353s, table=22, n_packets=0, n_bytes=0, idle_age=65534, priority=1,dl_vlan=4 actions=strip_vlan,load:0x44->NXM_NX_TUN_ID[],output:6,output:7
 cookie=0xf0733c083d3dceb, duration=9.345s, table=22, n_packets=0, n_bytes=0, idle_age=65534, priority=1,dl_vlan=3 actions=strip_vlan,load:0x35->NXM_NX_TUN_ID[],output:6,output:7
 cookie=0xf0733c083d3dceb, duration=14.082s, table=22, n_packets=162, n_bytes=13348, idle_age=206, priority=0 actions=drop

Here is my environment information:
[root@yjfnode04 ~]# ip netns exec qrouter-2659785b-b619-41c6-be13-f95cdd5e62b0 ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
39: qr-33133255-e2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN qlen 1000
    link/ether fa:16:3e:5c:cb:37 brd ff:ff:ff:ff:ff:ff
    inet 10.10.30.1/24 brd 10.10.30.255 scope global qr-33133255-e2
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe5c:cb37/64 scope link
       valid_lft forever preferred_lft forever
40: qr-ba3bd31e-ef: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN qlen 1000
    link/ether fa:16:3e:73:84:5f brd ff:ff:ff:ff:ff:ff
    inet 10.10.100.1/24 brd 10.10.100.255 scope global qr-ba3bd31e-ef
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe73:845f/64 scope link
       valid_lft forever preferred_lft forever
[root@yjfnode04 ~]#

[root@yjfnode04 ~]# ovs-vsctl show|grep qr-ba3bd31e-ef -A 1
        Port "qr-ba3bd31e-ef"
            tag: 1
            Interface "qr-ba3bd31e-ef"
                type: internal
[root@yjfnode04 ~]#

[root@yjfnode04 ~]# ovs-vsctl show|grep "tag: 1" -A 1
            tag: 1
            Interface "qr-ba3bd31e-ef"
[root@yjfnode04 ~]#