Hi Gary, <br><br>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. <br><br>Thanks, <br>
<br>Aaron<br><br>P.S: I'm guessing that you have this patch applied to your local branch right? <a href="https://github.com/openstack/quantum/commit/a74b3a55ac6d239a04bb6cfe3ba0e1ad825450bf">https://github.com/openstack/quantum/commit/a74b3a55ac6d239a04bb6cfe3ba0e1ad825450bf</a> <br>
<br><div class="gmail_quote">On Mon, Aug 6, 2012 at 4:56 AM, Gary Kotton <span dir="ltr"><<a href="mailto:gkotton@redhat.com" target="_blank">gkotton@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div bgcolor="#ffffff" text="#000000">
Hi,<br>
Please take a look at <a href="https://review.openstack.org/#/c/10879/" target="_blank">https://review.openstack.org/#/c/10879/</a> 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.<br>
<br>
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:<br>
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)<br>
2. The code depends the RPC support for the Linux bridge
<a href="https://review.openstack.org/#/c/9591/" target="_blank">https://review.openstack.org/#/c/9591/</a> (this has some utilities that
are used by this code). <br>
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.)<br>
4. I need to add unit tests. The initial testing has been done
manually.<br>
<br>
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.<br>
<br>
First trace<br>
======<br>
<br>
INFO:__main__:Assigning 1 as local vlan for
net-id=b85b44a8-a7be-4d74-bcb3-758c0cea7ce7<br>
2012-08-06 13:35:45 INFO [__main__] Assigning 1 as local vlan
for net-id=b85b44a8-a7be-4d74-bcb3-758c0cea7ce7<br>
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<br>
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<br>
DEBUG:quantum.agent.linux.utils:<br>
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']<br>
Exit code: 0<br>
Stdout: ''<br>
Stderr: 'ovs-ofctl: -1: value too large for 2-byte field in_port\n'<br>
2012-08-06 13:35:45 DEBUG [quantum.agent.linux.utils]<br>
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']<br>
Exit code: 0<br>
Stdout: ''<br>
Stderr: 'ovs-ofctl: -1: value too large for 2-byte field in_port\n'<br>
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<br>
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<br>
DEBUG:quantum.agent.linux.utils:<br>
<font color="#ff0000">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']<br>
Exit code: 0<br>
Stdout: ''<br>
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'<br>
2012-08-06 13:35:45 DEBUG [quantum.agent.linux.utils]</font><br>
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']<br>
Exit code: 0<br>
Stdout: ''<br>
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'<br>
DEBUG:quantum.agent.linux.utils:Running command: sudo ovs-vsctl
--timeout=2 set Port tap5d926758-e1 tag=1<br>
2012-08-06 13:35:45 DEBUG [quantum.agent.linux.utils] Running
command: sudo ovs-vsctl --timeout=2 set Port tap5d926758-e1 tag=1<br>
DEBUG:quantum.agent.linux.utils:<br>
Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'set', 'Port',
'tap5d926758-e1', 'tag=1']<br>
Exit code: 0<br>
Stdout: ''<br>
Stderr: ''<br>
2012-08-06 13:35:45 DEBUG [quantum.agent.linux.utils]<br>
Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'set', 'Port',
'tap5d926758-e1', 'tag=1']<br>
Exit code: 0<br>
Stdout: ''<br>
Stderr: ''<br>
<br>
Trace 2<br>
=====<br>
<br>
<br>
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']<br>
Exit code: 1<br>
Stdout: ''<br>
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'<br>
2012-08-06 13:37:13 DEBUG [quantum.agent.linux.utils] <br>
<font color="#ff0000"><b>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']<br>
Exit code: 1<br>
Stdout: ''<br>
</b></font>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'<br>
Traceback (most recent call last):<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 906, in <module><br>
main()<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 900, in main<br>
plugin.daemon_loop(db_connection_url)<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 859, in daemon_loop<br>
self.rpc_loop()<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 846, in rpc_loop<br>
reset = self.process_network_ports(port_info)<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 818, in process_network_ports<br>
resync_a = self.treat_devices_added(port_info['added'])<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 789, in treat_devices_added<br>
self.port_bound(port, details['network_id'], details['vlan_id'])<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 556, in port_bound<br>
self.provision_local_vlan(net_uuid, lsw_id)<br>
File
"/opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py",
line 533, in provision_local_vlan<br>
(lvid, self.patch_int_ofport))<br>
File "/opt/stack/quantum/quantum/agent/linux/ovs_lib.py", line
126, in add_flow<br>
self.run_ofctl("add-flow", [flow_str])<br>
File "/opt/stack/quantum/quantum/agent/linux/ovs_lib.py", line 73,
in run_ofctl<br>
return utils.execute(full_args, root_helper=self.root_helper)<br>
File "/opt/stack/quantum/quantum/agent/linux/utils.py", line 53,
in execute<br>
raise RuntimeError(m)<br>
RuntimeError: <br>
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']<br>
Exit code: 1<br>
Stdout: ''<br>
<br>
Thanks<span class="HOEnZb"><font color="#888888"><br>
Gary<br>
</font></span></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br>