[openstack-dev] [Quantum] RPC support for OVS

Aaron Rosen arosen at nicira.com
Mon Aug 6 17:12:30 UTC 2012


Hi Gary,

It seemed like the issue your are having is because the agent is trying to
install flows for ports that don't actually exist (hence port.ofport(-1)).
Let me try to reproduce this in my setup.

Thanks,

Aaron

P.S: I'm guessing that you have this patch applied to your local branch
right?
https://github.com/openstack/quantum/commit/a74b3a55ac6d239a04bb6cfe3ba0e1ad825450bf

On Mon, Aug 6, 2012 at 4:56 AM, Gary Kotton <gkotton at redhat.com> wrote:

> **
> Hi,
> Please take a look at https://review.openstack.org/#/c/10879/ for the RPC
> support for the OVS. I would appreciate it if the guys familiar with the
> OVS and RYU agents would take a look and let me know if they have any
> comments.
>
> At the moment I have labeled it as WIP due to the fact that there are a
> number of things that still need to be done:
> 1. I need to treat the tunneling, that is, in the current implementation
> the local IP is added to the database and then the agent polls the database
> to read if there are additional tunnels (please let me know if I have
> misunderstood something here). This needs to be supported by the RPC
> mechanism (I am currently coding)
> 2. The code depends the RPC support for the Linux bridge
> https://review.openstack.org/#/c/9591/ (this has some utilities that are
> used by this code).
> 3. There is a lot of "common" code between the Linux bridge and ovs
> plugins for the RPC support. Once the above patch is approved I'll make the
> code common so that it can be used by other agents (ryu, dhcp agent etc.)
> 4. I need to add unit tests. The initial testing has been done manually.
>
> In addition to this I have stumbled upon a problem with the ovs agent.
> This happens when the agent starts. There are two traces below. The first
> trace is where everything works OK and the second trace is where there is
> an exception. The same ovs-vsctl command is used. There are just different
> return codes.
>
> First trace
> ======
>
> INFO:__main__:Assigning 1 as local vlan for
> net-id=b85b44a8-a7be-4d74-bcb3-758c0cea7ce7
> 2012-08-06 13:35:45     INFO [__main__] Assigning 1 as local vlan for
> net-id=b85b44a8-a7be-4d74-bcb3-758c0cea7ce7
> DEBUG:quantum.agent.linux.utils:Running command: sudo ovs-ofctl add-flow
> br-tun
> hard_timeout=0,idle_timeout=0,priority=4,in_port=-1,dl_vlan=1,actions=strip_vlan,set_tunnel:1,normal
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils] Running command:
> sudo ovs-ofctl add-flow br-tun
> hard_timeout=0,idle_timeout=0,priority=4,in_port=-1,dl_vlan=1,actions=strip_vlan,set_tunnel:1,normal
> DEBUG:quantum.agent.linux.utils:
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=4,in_port=-1,dl_vlan=1,actions=strip_vlan,set_tunnel:1,normal']
> Exit code: 0
> Stdout: ''
> Stderr: 'ovs-ofctl: -1: value too large for 2-byte field in_port\n'
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils]
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=4,in_port=-1,dl_vlan=1,actions=strip_vlan,set_tunnel:1,normal']
> Exit code: 0
> Stdout: ''
> Stderr: 'ovs-ofctl: -1: value too large for 2-byte field in_port\n'
> DEBUG:quantum.agent.linux.utils:Running command: sudo ovs-ofctl add-flow
> br-tun
> hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils] Running command:
> sudo ovs-ofctl add-flow br-tun
> hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1
> DEBUG:quantum.agent.linux.utils:
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1']
> Exit code: 0
> Stdout: ''
> Stderr: 'OFPT_ERROR (xid=0x2): type OFPET_BAD_ACTION, code
> OFPBAC_BAD_OUT_PORT\n(***truncated to 64 bytes from 80***)\n00000000  01 04
> 00 50 00 00 00 02-00 00 23 20 00 00 00 0d |...P......# ....|\n00000010  00
> 00 00 00 00 00 00 00-00 00 00 00 00 00 00 03 |................|\n00000020
> ff ff ff ff ff ff 00 00-00 0c 00 00 00 00 00 00
> |................|\n00000030  00 01 20 08 00 00 00 00-00 00 00 01 00 00 00
> 00 |.. .............|\n'
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils]
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1']
> Exit code: 0
> Stdout: ''
> Stderr: 'OFPT_ERROR (xid=0x2): type OFPET_BAD_ACTION, code
> OFPBAC_BAD_OUT_PORT\n(***truncated to 64 bytes from 80***)\n00000000  01 04
> 00 50 00 00 00 02-00 00 23 20 00 00 00 0d |...P......# ....|\n00000010  00
> 00 00 00 00 00 00 00-00 00 00 00 00 00 00 03 |................|\n00000020
> ff ff ff ff ff ff 00 00-00 0c 00 00 00 00 00 00
> |................|\n00000030  00 01 20 08 00 00 00 00-00 00 00 01 00 00 00
> 00 |.. .............|\n'
> DEBUG:quantum.agent.linux.utils:Running command: sudo ovs-vsctl
> --timeout=2 set Port tap5d926758-e1 tag=1
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils] Running command:
> sudo ovs-vsctl --timeout=2 set Port tap5d926758-e1 tag=1
> DEBUG:quantum.agent.linux.utils:
> Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'set', 'Port',
> 'tap5d926758-e1', 'tag=1']
> Exit code: 0
> Stdout: ''
> Stderr: ''
> 2012-08-06 13:35:45    DEBUG [quantum.agent.linux.utils]
> Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'set', 'Port',
> 'tap5d926758-e1', 'tag=1']
> Exit code: 0
> Stdout: ''
> Stderr: ''
>
> Trace 2
> =====
>
>
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1']
> Exit code: 1
> Stdout: ''
> Stderr: 'OFPT_ERROR (xid=0x2): type OFPET_BAD_ACTION, code
> OFPBAC_BAD_OUT_PORT\n(***truncated to 64 bytes from 80***)\n00000000  01 04
> 00 50 00 00 00 02-00 00 23 20 00 00 00 0d |...P......# ....|\n00000010  00
> 00 00 00 00 00 00 00-00 00 00 00 00 00 00 03 |................|\n00000020
> ff ff ff ff ff ff 00 00-00 0c 00 00 00 00 00 00
> |................|\n00000030  00 01 20 08 00 00 00 00-00 00 00 01 00 00 00
> 00 |.. .............|\n'
> 2012-08-06 13:37:13    DEBUG [quantum.agent.linux.utils]
> *Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1']
> Exit code: 1
> Stdout: ''
> *Stderr: 'OFPT_ERROR (xid=0x2): type OFPET_BAD_ACTION, code
> OFPBAC_BAD_OUT_PORT\n(***truncated to 64 bytes from 80***)\n00000000  01 04
> 00 50 00 00 00 02-00 00 23 20 00 00 00 0d |...P......# ....|\n00000010  00
> 00 00 00 00 00 00 00-00 00 00 00 00 00 00 03 |................|\n00000020
> ff ff ff ff ff ff 00 00-00 0c 00 00 00 00 00 00
> |................|\n00000030  00 01 20 08 00 00 00 00-00 00 00 01 00 00 00
> 00 |.. .............|\n'
> Traceback (most recent call last):
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 906, in <module>
>     main()
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 900, in main
>     plugin.daemon_loop(db_connection_url)
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 859, in daemon_loop
>     self.rpc_loop()
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 846, in rpc_loop
>     reset = self.process_network_ports(port_info)
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 818, in process_network_ports
>     resync_a = self.treat_devices_added(port_info['added'])
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 789, in treat_devices_added
>     self.port_bound(port, details['network_id'], details['vlan_id'])
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 556, in port_bound
>     self.provision_local_vlan(net_uuid, lsw_id)
>   File
> "/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
> line 533, in provision_local_vlan
>     (lvid, self.patch_int_ofport))
>   File "/opt/stack/quantum/quantum/agent/linux/ovs_lib.py", line 126, in
> add_flow
>     self.run_ofctl("add-flow", [flow_str])
>   File "/opt/stack/quantum/quantum/agent/linux/ovs_lib.py", line 73, in
> run_ofctl
>     return utils.execute(full_args, root_helper=self.root_helper)
>   File "/opt/stack/quantum/quantum/agent/linux/utils.py", line 53, in
> execute
>     raise RuntimeError(m)
> RuntimeError:
> Command: ['sudo', 'ovs-ofctl', 'add-flow', 'br-tun',
> 'hard_timeout=0,idle_timeout=0,priority=3,tun_id=1,actions=mod_vlan_vid:1,output:-1']
> Exit code: 1
> Stdout: ''
>
> Thanks
> Gary
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120806/b1116771/attachment-0001.html>


More information about the OpenStack-dev mailing list