Merge pull request #16110 from Mashimiao/daemon-create-fix-return-and-adjust

before adjusting should check whether need return or not
This commit is contained in:
David Calavera 2015-09-07 09:16:23 -07:00
Родитель 6743a6e665 73d8af9319
Коммит c1c4ccefcd
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -21,11 +21,12 @@ func (daemon *Daemon) ContainerCreate(name string, config *runconfig.Config, hos
} }
warnings, err := daemon.verifyContainerSettings(hostConfig, config) warnings, err := daemon.verifyContainerSettings(hostConfig, config)
daemon.adaptContainerSettings(hostConfig, adjustCPUShares)
if err != nil { if err != nil {
return nil, warnings, err return nil, warnings, err
} }
daemon.adaptContainerSettings(hostConfig, adjustCPUShares)
container, buildWarnings, err := daemon.Create(config, hostConfig, name) container, buildWarnings, err := daemon.Create(config, hostConfig, name)
if err != nil { if err != nil {
if daemon.Graph().IsNotExist(err, config.Image) { if daemon.Graph().IsNotExist(err, config.Image) {