>On Thu, Mar 21, 2024 at 08:33:37PM +0800, yangchang wrote: >> Before creating an mirror port, it is necessary to first check whether the >> original port exists. >> Otherwise, when the original port does not exist, the created mirror port >> will remain. >> >> Signed-off-by: yangchang <[email protected]> > > Hi, > > Thanks for your patch. > > As I understand things, this avoids a residual mirror port for an error > case, by checking for the error condition before the port is created. > > As such I agree it improves the situation. However, I see several other > error cases that occur, which result in calls to sys.exit(1), after the > mirror port is created (the call to _make_mirror_name). And that there are > other resources that seem to dangle, f.e. the call to _make_taps(). > > I am wondering if it would be netter to take a more robust approach to > cleaning up resources when errors occur.
Thanks for your review. When errors occur , the function(cleanup_mirror) well be called to clean up resources , it is registered by teardown, it can cover the vast majority of error scenarios except for the case. So I think it is OK that just solve the case. [email protected] _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
