Skip to content

Conversation

@fcrisciani
Copy link

First commit moves the peerAdd/peerDelete operation behind a channel
Second commit deals with a possible deadlock on the pMap Lock. Because of the lazy instantiation logic of the overlay driver, the initSandbox has in all cases to fetch peers from the DB. Moreover this operation has to be atomic on the whole table to avoid a race with subsequent peerAdd/peerDelete that can asynchronously come from the networkDB.

Backport of: #1893

Flavio Crisciani added 3 commits August 5, 2017 12:15
This reverts commit de61c2f.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
(cherry picked from commit 8d6355b)
Remove the need for the wait group and avoid new
locks
Added utility to print the method name and the caller name

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
(cherry picked from commit 0a9aaf8)
Move the sandbox init logic into the go routine that handles
peer operations.
This is to avoid deadlocks in the use of the pMap.Lock for the
network

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
(cherry picked from commit 37502ac)
@fcrisciani
Copy link
Author

conflict due to change of tableName to table.Name

@mavenugo
Copy link
Contributor

mavenugo commented Aug 5, 2017

For better tracking : This PR brings back #1861 with the additional changes to avoid the deadlock.

@mavenugo mavenugo merged commit 7b97431 into moby:release/v0.9 Aug 5, 2017
@fcrisciani fcrisciani deleted the backport-17.03 branch August 5, 2017 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants