mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 23:05:29 +00:00
ovs-tcpdump: destroy_mirror should really destroy the mirror.
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
committed by
Ben Pfaff
parent
b47d91a740
commit
efeb3e44b2
@@ -230,7 +230,8 @@ class OVSDB(object):
|
|||||||
(port_name, txn.get_error()))
|
(port_name, txn.get_error()))
|
||||||
self._txn = None
|
self._txn = None
|
||||||
|
|
||||||
def destroy_mirror(self, mirror_name, bridge_name):
|
def destroy_mirror(self, intf_name, bridge_name):
|
||||||
|
mirror_name = 'm_%s' % intf_name
|
||||||
if not self.mirror_exists(mirror_name):
|
if not self.mirror_exists(mirror_name):
|
||||||
return
|
return
|
||||||
txn = self._start_txn()
|
txn = self._start_txn()
|
||||||
@@ -433,7 +434,7 @@ def main():
|
|||||||
raise KeyboardInterrupt
|
raise KeyboardInterrupt
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pipes.terminate()
|
pipes.terminate()
|
||||||
ovsdb.destroy_mirror('m%s' % interface, ovsdb.port_bridge(interface))
|
ovsdb.destroy_mirror(interface, ovsdb.port_bridge(interface))
|
||||||
ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
|
ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
|
||||||
except Exception:
|
except Exception:
|
||||||
print("Unable to tear down the ports and mirrors.")
|
print("Unable to tear down the ports and mirrors.")
|
||||||
|
Reference in New Issue
Block a user