dockertools: use network PluginManager to synchronize pod network operations

We need to tear down networking when garbage collecting containers too,
and GC is run from a different goroutine in kubelet.  We don't want
container network operations running for the same pod concurrently.
This commit is contained in:
Dan Williams
2016-12-06 15:58:44 -06:00
parent 4c3cc67385
commit dc2fd511ab
3 changed files with 24 additions and 28 deletions

View File

@@ -457,7 +457,7 @@ func TestGetPodStatusFromNetworkPlugin(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
fnp := nettest.NewMockNetworkPlugin(ctrl)
dm.networkPlugin = fnp
dm.network = network.NewPluginManager(fnp)
fakeDocker.SetFakeRunningContainers([]*FakeContainer{
{