Fix deadlock upon Docker Startup

This commit is contained in:
2021-03-03 22:44:38 +01:00
parent 0ada35f550
commit 54b1240478
+5 -2
View File
@@ -250,11 +250,14 @@ def endpoint_info():
def delete_endpoint():
req = request.get_json(force=True)
bridge = net_bridge(req['NetworkID'])
if_host, _if_container = veth_pair(req['EndpointID'])
if_host = interface.GetInterface(LIBRARY, if_host)
interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
if library == 'NDB':
bridge = net_bridge(req['NetworkID'])
interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
else:
interface.DelPort(LIBRARY, 'dummy0', if_host.ifname)
interface.RemoveInterface(LIBRARY, if_host.ifname)
return jsonify({})