Merge pull request #409 from sameo/topic/fat-lock
Serialize Update and Sandbox/Container creation operations
This commit is contained in:
commit
3c7f3ab2ec
3 changed files with 22 additions and 12 deletions
|
@ -230,6 +230,10 @@ func ensureSaneLogPath(logPath string) error {
|
|||
func (s *Server) CreateContainer(ctx context.Context, req *pb.CreateContainerRequest) (res *pb.CreateContainerResponse, err error) {
|
||||
logrus.Debugf("CreateContainerRequest %+v", req)
|
||||
s.Update()
|
||||
|
||||
s.updateLock.RLock()
|
||||
defer s.updateLock.RUnlock()
|
||||
|
||||
sbID := req.PodSandboxId
|
||||
if sbID == "" {
|
||||
return nil, fmt.Errorf("PodSandboxId should not be empty")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue