Explorar el Código

add lock in libcontainerd client AddProcess of Windows

Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 5143be0ccf70c7cb2acc2aa39fd7ec47450e5daa)
Signed-off-by: Victor Vieux <vieux@docker.com>
allencloud hace 8 años
padre
commit
7ae3379a64
Se han modificado 2 ficheros con 2 adiciones y 0 borrados
  1. 1 0
      daemon/daemon.go
  2. 1 0
      libcontainerd/client_windows.go

+ 1 - 0
daemon/daemon.go

@@ -606,6 +606,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
 		return nil, err
 	}
 
+	// Plugin system initialization should happen before restore. Do not change order.
 	if err := pluginInit(d, config, containerdRemote); err != nil {
 		return nil, err
 	}

+ 1 - 0
libcontainerd/client_windows.go

@@ -255,6 +255,7 @@ func (clnt *client) AddProcess(ctx context.Context, containerID, processFriendly
 
 	// Tell the engine to attach streams back to the client
 	if err := clnt.backend.AttachStreams(processFriendlyName, *iopipe); err != nil {
+		clnt.lock(containerID)
 		return err
 	}