Fix deadlock upon Docker Startup
This commit is contained in:
+4
-1
@@ -250,11 +250,14 @@ def endpoint_info():
|
|||||||
def delete_endpoint():
|
def delete_endpoint():
|
||||||
req = request.get_json(force=True)
|
req = request.get_json(force=True)
|
||||||
|
|
||||||
bridge = net_bridge(req['NetworkID'])
|
|
||||||
if_host, _if_container = veth_pair(req['EndpointID'])
|
if_host, _if_container = veth_pair(req['EndpointID'])
|
||||||
if_host = interface.GetInterface(LIBRARY, if_host)
|
if_host = interface.GetInterface(LIBRARY, if_host)
|
||||||
|
|
||||||
|
if library == 'NDB':
|
||||||
|
bridge = net_bridge(req['NetworkID'])
|
||||||
interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
|
interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
|
||||||
|
else:
|
||||||
|
interface.DelPort(LIBRARY, 'dummy0', if_host.ifname)
|
||||||
interface.RemoveInterface(LIBRARY, if_host.ifname)
|
interface.RemoveInterface(LIBRARY, if_host.ifname)
|
||||||
|
|
||||||
return jsonify({})
|
return jsonify({})
|
||||||
|
|||||||
Reference in New Issue
Block a user