On 3/12/2013 12:27 PM, Ben Pfaff wrote:
> On Tue, Mar 12, 2013 at 11:13:30AM +0800, sparveriu...@gmail.com wrote:
>> On 3/12/2013 1:57 AM, Ben Pfaff wrote:
>> Thanks for the reply, my scenario looks like this.
>>
>> [1] Use "ovs-vsctl" to set OVS fail-mode to secure mode.
>>
>> [2] Controller A connects to OVS.
>>
>> [3] Controller B connects to OVS.
>>
>> [4] Controller A sends a OFP_FLOW_MOD packet to OVS to insert a flow
>> entry on the flow table, also verified with "ovs-ofctl dump-flows".
>> e.g. ( cookie=0x0, duration=1.169s, table=0, n_packets=0, n_bytes=0,
>> in_port=1 actions=output:2 )
>>
>> [5] Controller A disconnects from OVS. The flow entry still remains on
>> the flow table.
>>
>> [6] Controller A connects again to OVS. This time all the flow entries
>> are cleared from the flow table. The same scenario also occurs when
>> disconnecting and reconnecting Controller B instead. (For reference,
>> both controllers are POX)
> 
> Open vSwitch doesn't clear the flow table on controller connection or
> disconnection.  Perhaps one of the controllers is clearing it.  If you
> are using a new enough version of Open vSwitch, you can use "ovs-ofctl
> monitor <switch> watch:" to observe changes in the flow table, which
> might help to see what's going on.
> 
Thanks Ben,

I finally found out the culprit for the clear flow table action on
connecting. It was actually written in one of the POX Controller's
OpenFlow basic event handling functions, comment it out and it worked
like a charm.

if con.ofnexus.clear_flows_on_connect:
  con.send(of.ofp_flow_mod(match=of.ofp_match(), command=of.OFPFC_DELETE))

Thanks again for the help and advice.

_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to