On 6/3/22 17:51, Mike Pattrick wrote:
> On Fri, May 20, 2022 at 5:55 AM Han Ding <hand...@chinatelecom.cn> wrote:
>>
>>
>> Sometimes we need to dump packets on more than two interfaces in a bridge
>> at the same time. Then when we stop dumping in order, ovs-tcpdump print
>> traceback and fail to delete mirror interface for some interface.
>>
>> For example:
>> br-int has two interface tap1 and br-int. We use ovs-tcpdump dump tap1 first
>> and dump br-int next. Then stopping tap1 ovs-tcpdump first, and stopping
>> br-int second. When we stop ovs-tcpdump for br-int, the screen show the error
>> like this:
>> __main__.OVSDBException: Unable to delete Mirror m_br-int
>>
>> Signed-off-by: Han Ding <hand...@chinatelecom.cn>
> 
> I can confirm that this issue does occur, and this patch fixes it.
> 
> Acked-by: Mike Pattrick <m...@redhat.com>
> 
> Small nit but instead of closing and reopening the OVSDB object, maybe
> we should just atexit.register the call to ovsdb.close_idl.
> 
> Cheers,
> M

Thanks, Han and Mike!

The fully correct solution, I guess, is to periodically call idl.run()
to update the current database representation, but it's not clear, how
to implement that.  And if we're not calling idl.run() server will
disconnect us at some point anyway because of inactivity.  So, closing
the connection before starting tcpdump does make sense.

Applied to master and branch 2.17.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to