Skip to content

Commit

Permalink
Merge pull request #1614 from Ace-Tang/fix_r
Browse files Browse the repository at this point in the history
bugfix: fix memory-swap flag not validate correct
  • Loading branch information
allencloud authored Jul 3, 2018
2 parents 5ab6f01 + ea5d25c commit 7caca29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,15 @@ func (mgr *ContainerManager) Create(ctx context.Context, name string, config *ty
container.Snapshotter.Data["UpperDir"] = upperDir
}

// amendContainerSettings modify container config settings to wanted
amendContainerSettings(&config.ContainerConfig, config.HostConfig)

// validate container Config
warnings, err := validateConfig(&config.ContainerConfig, config.HostConfig, false)
if err != nil {
return nil, err
}

// amendContainerSettings modify container config settings to wanted
amendContainerSettings(&config.ContainerConfig, config.HostConfig)

// store disk
if err := container.Write(mgr.Store); err != nil {
logrus.Errorf("failed to update meta: %v", err)
Expand Down

0 comments on commit 7caca29

Please sign in to comment.