Hi ILya, On Tue, Jul 19, 2022 at 9:49 PM Ilya Maximets <[email protected]> wrote:
> On 6/22/22 20:36, Abhiram R N wrote: > > Added changes in ovn-nbctl, ovn-sbctl, northd and in ovn-controller. > > While Mirror creation just creates the mirror, the lsp-attach-mirror > > triggers the sequence to create Mirror in OVS DB on compute node. > > OVS already supports Port Mirroring. > > > > Note: This is targeted to mirror to destinations anywhere outside the > > cluster where the analyser resides and it need not be an OVN node. > > > > Example commands are as below: > > > > Mirror creation > > ovn-nbctl mirror-add mirror1 gre 0 from-lport 10.10.10.2 > > > > Attach a logical port to the mirror. > > ovn-nbctl lsp-attach-mirror sw0-port1 mirror1 > > > > Detach a source from Mirror > > ovn-nbctl lsp-detach-mirror sw0-port1 mirror1 > > > > Mirror deletion > > ovn-nbctl mirror-del mirror1 > > > > Co-authored-by: Veda Barrenkala <[email protected]> > > Signed-off-by: Veda Barrenkala <[email protected]> > > Signed-off-by: Abhiram R N <[email protected]> > > --- > > Not a full review, I just wanted to highlight one issue with the patch. > IIUC, after this change OVN will own all the mirrors configured for OVS. > This will mean that ovn-controller will remove, for example, mirrors > created by ovs-tcpdump or any other manually created mirrors. I don't > think that's a good thing to do. The solution should probably mark > mirrors created by OVN with some external-id and not touch mirrors that > doesn't have it. > > Thanks for your inputs. I checked the code. One place specifically with respect to removing of mirror like Numan has given comment, I am going to use SBREC_MIRROR_FOR_EACH_TRACKED rather than looking at all OVS mirrors which should solve the issue you pointed out. (i.e OVS mirrors which are not created by OVN won't get removed) So, next patch I will address it. Additionally already other places where we are handling the OVS mirrors I have a check if it has a corresponding entry in the OVN South Bound database and only then handle/update it. Which can happen only when OVN created it. Thanks & Regards, Abhiram RN > Best regards, Ilya Maximets. > > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
