- Concurrent leave/join of one member overlay network can end with the error:
"subnet sandbox join failed for "A.B.C.D/MM": error creating vxlan interface: file exists"
This happens when the join is processed while the leave has already started.
Having the network one member only, the leave resets the once variable for this network subnets
and triggers the sandbox destroy for each subnet's vxlan interface, when the n.joinCnt goes to 0.
But given the destroySandbox() is not atomic, the join thread can trigger the creation of the
vxlan interface in between (given subnet.once was re-initialized) before the leave thread
removes the vxlan interface for this subnet.
- The fix is to not allow interruptions between the re-initialization of the subnet.once var and
consequent vxlan interface removal.
Signed-off-by: Alessandro Boch <aboch@docker.com>
Join & Leave Serf processing happens in a separate goroutine and there
are cases as in https://github.com/docker/libnetwork/issues/985, it can
cause lookup failures when endpoint delete processing happens before
Serf gets a chance to handle the leave processing.
The fix is to avoid such lookups in this goroutine, but handle the
endpoint and network objects directly.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
With the current implementation, a config relaod event causes all the
datastores to reinitialize and that impacts objects with Persist=false
such as none and host network.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
- in bridge driver modprobe for br_netfilter only if EnableIPTables==true
- move FirewalldInit() to iptables pakcage Init()
- move modprobe for nf_nat and xt_conntrack in iptables.initCheck()
Signed-off-by: Alessandro Boch <aboch@docker.com>
If we encounter an error setting an interface's IPv4 or IPv6 address,
log the addresses we tried to use using the %v specifier rather than %q.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
Previously hook expected data with a wrong type.
Full netns path is not included with the data
passed with the hook.
Fixes#829
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
During ungraceful shutdown, it is possible that the endpoint_cnt can be
inconsistent with the actual endpoints in a network. This fix will
resolve that inconsistency
Signed-off-by: Madhu Venugopal <madhu@docker.com>
- ... on ungraceful shutdown during network create
- Allow forceful deletion of network
- On network delete, first mark the network for deletion
- On controller creation, first forcely remove any network
that is marked for deletion.
Signed-off-by: Alessandro Boch <aboch@docker.com>