Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit cfe657d

Browse files
Merge component 'engine' from git@github.com:docker/engine 19.03
2 parents bb0b936 + 9e38db3 commit cfe657d

15 files changed

Lines changed: 36 additions & 23 deletions

File tree

components/engine/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#
2626

2727
ARG CROSS="false"
28-
ARG GO_VERSION=1.12.12
28+
ARG GO_VERSION=1.12.14
2929
ARG DEBIAN_FRONTEND=noninteractive
3030

3131
FROM golang:${GO_VERSION}-stretch AS base

components/engine/Dockerfile.e2e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_VERSION=1.12.12
1+
ARG GO_VERSION=1.12.14
22

33
FROM golang:${GO_VERSION}-alpine AS base
44

components/engine/Dockerfile.simple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# This represents the bare minimum required to build and test Docker.
77

8-
ARG GO_VERSION=1.12.12
8+
ARG GO_VERSION=1.12.14
99

1010
FROM golang:${GO_VERSION}-stretch
1111

components/engine/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ FROM microsoft/windowsservercore
165165
# Use PowerShell as the default shell
166166
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
167167

168-
ARG GO_VERSION=1.12.12
168+
ARG GO_VERSION=1.12.14
169169

170170
# Environment variable notes:
171171
# - GO_VERSION must be consistent with 'Dockerfile' used by Linux.

components/engine/daemon/daemon_unix.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ func getBlkioWeightDevices(config containertypes.Resources) ([]specs.LinuxWeight
193193
}
194194
weight := weightDevice.Weight
195195
d := specs.LinuxWeightDevice{Weight: &weight}
196-
d.Major = int64(unix.Major(stat.Rdev))
197-
d.Minor = int64(unix.Minor(stat.Rdev))
196+
// The type is 32bit on mips.
197+
d.Major = int64(unix.Major(uint64(stat.Rdev))) // nolint: unconvert
198+
d.Minor = int64(unix.Minor(uint64(stat.Rdev))) // nolint: unconvert
198199
blkioWeightDevices = append(blkioWeightDevices, d)
199200
}
200201

@@ -264,8 +265,9 @@ func getBlkioThrottleDevices(devs []*blkiodev.ThrottleDevice) ([]specs.LinuxThro
264265
return nil, err
265266
}
266267
d := specs.LinuxThrottleDevice{Rate: d.Rate}
267-
d.Major = int64(unix.Major(stat.Rdev))
268-
d.Minor = int64(unix.Minor(stat.Rdev))
268+
// the type is 32bit on mips
269+
d.Major = int64(unix.Major(uint64(stat.Rdev))) // nolint: unconvert
270+
d.Minor = int64(unix.Minor(uint64(stat.Rdev))) // nolint: unconvert
269271
throttleDevices = append(throttleDevices, d)
270272
}
271273

components/engine/daemon/daemon_windows.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ package daemon // import "github.com/docker/docker/daemon"
33
import (
44
"context"
55
"fmt"
6+
"math"
67
"path/filepath"
8+
"runtime"
79
"strings"
810

911
"github.com/Microsoft/hcsshim"
@@ -40,9 +42,10 @@ const (
4042
windowsMaxCPUPercent = 100
4143
)
4244

43-
// Windows doesn't really have rlimits.
45+
// Windows containers are much larger than Linux containers and each of them
46+
// have > 20 system processes which why we use much smaller parallelism value.
4447
func adjustParallelLimit(n int, limit int) int {
45-
return limit
48+
return int(math.Max(1, math.Floor(float64(runtime.NumCPU())*.8)))
4649
}
4750

4851
// Windows has no concept of an execution state directory. So use config.Root here.

components/engine/daemon/graphdriver/copy/copy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error {
146146

147147
switch mode := f.Mode(); {
148148
case mode.IsRegular():
149-
id := fileID{dev: stat.Dev, ino: stat.Ino}
149+
//the type is 32bit on mips
150+
id := fileID{dev: uint64(stat.Dev), ino: stat.Ino} // nolint: unconvert
150151
if copyMode == Hardlink {
151152
isHardlink = true
152153
if err2 := os.Link(srcPath, dstPath); err2 != nil {

components/engine/daemon/graphdriver/devmapper/deviceset.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,8 @@ func getDeviceMajorMinor(file *os.File) (uint64, uint64, error) {
15271527
return 0, 0, err
15281528
}
15291529

1530-
dev := stat.Rdev
1530+
// the type is 32bit on mips
1531+
dev := uint64(stat.Rdev) // nolint: unconvert
15311532
majorNum := major(dev)
15321533
minorNum := minor(dev)
15331534

@@ -1738,7 +1739,8 @@ func (devices *DeviceSet) initDevmapper(doInit bool) (retErr error) {
17381739
// - Managed by docker
17391740
// - The target of this device is at major <maj> and minor <min>
17401741
// - If <inode> is defined, use that file inside the device as a loopback image. Otherwise use the device itself.
1741-
devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(st.Dev), minor(st.Dev), st.Ino)
1742+
// The type Dev in Stat_t is 32bit on mips.
1743+
devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(uint64(st.Dev)), minor(uint64(st.Dev)), st.Ino) // nolint: unconvert
17421744
logger.Debugf("Generated prefix: %s", devices.devicePrefix)
17431745

17441746
// Check for the existence of the thin-pool device

components/engine/daemon/logger/gelf/gelf.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ func newGELFUDPWriter(address string, info logger.Info) (gelf.Writer, error) {
166166
}
167167

168168
func (s *gelfLogger) Log(msg *logger.Message) error {
169+
if len(msg.Line) == 0 {
170+
return nil
171+
}
172+
169173
level := gelf.LOG_INFO
170174
if msg.Source == "stderr" {
171175
level = gelf.LOG_ERR

components/engine/hack/dockerfile/install/containerd.installer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# containerd is also pinned in vendor.conf. When updating the binary
55
# version you may also need to update the vendor version to pick up bug
66
# fixes or new APIs.
7-
CONTAINERD_COMMIT=b34a5c8af56e510852c35414db4c1f4fa6172339 # v1.2.10
7+
CONTAINERD_COMMIT=f772c10a585ced6be8f86e8c58c2b998412dd963 # v1.2.11
88

99
install_containerd() {
1010
echo "Install containerd version $CONTAINERD_COMMIT"

0 commit comments

Comments
 (0)