mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-09-03 12:21:32 +00:00
Cleanup dangling sandboxes on boot up
Currently when docker exits ungracefully it may leave dangling sandboxes which may hold onto precious network resources. Added checkpoint state for sandboxes which on boot up will be used to clean up the sandboxes and network resources. On bootup the remaining dangling state in the checkpoint are read and cleaned up before accepting any new network allocation requests. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
@@ -30,6 +30,10 @@ function test_single_network_connectivity() {
|
||||
done
|
||||
done
|
||||
|
||||
if [ -n "$3" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Teardown the container connections and the network
|
||||
for i in `seq ${start} ${end}`;
|
||||
do
|
||||
@@ -70,6 +74,27 @@ function test_single_network_connectivity() {
|
||||
dnet_cmd $(inst_id2port 1) network rm singlehost
|
||||
}
|
||||
|
||||
@test "Test bridge network dnet ungraceful restart" {
|
||||
skip_for_circleci
|
||||
|
||||
echo $(docker ps)
|
||||
dnet_cmd $(inst_id2port 1) network create -d bridge singlehost
|
||||
|
||||
for iter in `seq 1 2`;
|
||||
do
|
||||
if [ "$iter" -eq 1 ]; then
|
||||
test_single_network_connectivity singlehost 3 skip
|
||||
else
|
||||
test_single_network_connectivity singlehost 3
|
||||
fi
|
||||
|
||||
docker restart dnet-1-bridge
|
||||
sleep 5
|
||||
done
|
||||
|
||||
dnet_cmd $(inst_id2port 1) network rm singlehost
|
||||
}
|
||||
|
||||
@test "Test multiple bridge networks" {
|
||||
skip_for_circleci
|
||||
|
||||
|
||||
Reference in New Issue
Block a user