From 62992f54852340ba32ef15cc92403aae9db4ce70 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Tue, 23 Oct 2018 12:27:49 +0100 Subject: [PATCH 1/2] versions: Update cri containerd version for golang 1.10.2 fix Updated `externals.cri-containerd.version` in `versions.yaml` to the newest version that includes the fix for building on golang 1.10.2: - https://github.com/containerd/cri/commits/8b0d53c09c41d9fbc3b3896548ecf011518e3c42 Signed-off-by: James O. D. Hunt --- versions.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/versions.yaml b/versions.yaml index 6df983ee2..d0b6670fc 100644 --- a/versions.yaml +++ b/versions.yaml @@ -138,9 +138,12 @@ externals: cri-containerd: description: | - Containerd Plugin for Kubernetes Container Runtime Interface + Containerd Plugin for Kubernetes Container Runtime Interface. + + Note that the current version is required for golang 1.10.2 + (see https://github.com/containerd/cri/pull/941). url: "https://github.com/containerd/cri" - version: "v1.0.5" + version: "8b0d53c09c41d9fbc3b3896548ecf011518e3c42" meta: containerd-version: "1.1.3" From 526d55b4af796f0c6330f639cc956739c7574093 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Tue, 18 Sep 2018 12:14:42 +0100 Subject: [PATCH 2/2] versions: Update golang to 1.10.4 Move to golang version 1.10.4 -- the oldest stable golang release at the time of writing -- since golang 1.10+ is needed to make namespace handling safe. Re-ordered a couple of structs (moved `sync.WaitGroup` fields) to keep the `maligned` linter happy. Previously: `` virtcontainers/pkg/mock/cc_proxy_mock.go:24:18:warning: struct of size 160 could be 152 (maligned) virtcontainers/monitor.go:15:14:warning: struct of size 80 could be 72 (maligned) ``` See: - https://github.com/golang/go/issues/20676 - https://github.com/golang/go/commit/2595fe7fb6f272f9204ca3ef0b0c55e66fb8d90f Also bumped `languages.golang.meta.newest-version` to golang version 1.11, which is the newest stable release at the time of writing. Fixes #148. Signed-off-by: James O. D. Hunt --- versions.yaml | 5 +++-- virtcontainers/monitor.go | 2 +- virtcontainers/pkg/mock/cc_proxy_mock.go | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/versions.yaml b/versions.yaml index d0b6670fc..cc26c0126 100644 --- a/versions.yaml +++ b/versions.yaml @@ -186,9 +186,10 @@ languages: golang: description: "Google's 'go' language" notes: "'version' is the default minimum version used by this project." - version: "1.9.7" + issue: "https://github.com/golang/go/issues/20676" + version: "1.10.4" meta: - newest-version: "1.10" + newest-version: "1.11" specs: description: "Details of important specifications" diff --git a/virtcontainers/monitor.go b/virtcontainers/monitor.go index fdf523a7d..8e2a87974 100644 --- a/virtcontainers/monitor.go +++ b/virtcontainers/monitor.go @@ -18,9 +18,9 @@ type monitor struct { sandbox *Sandbox checkInterval time.Duration watchers []chan error + wg sync.WaitGroup running bool stopCh chan bool - wg sync.WaitGroup } func newMonitor(s *Sandbox) *monitor { diff --git a/virtcontainers/pkg/mock/cc_proxy_mock.go b/virtcontainers/pkg/mock/cc_proxy_mock.go index 052612ade..23dd7f980 100644 --- a/virtcontainers/pkg/mock/cc_proxy_mock.go +++ b/virtcontainers/pkg/mock/cc_proxy_mock.go @@ -25,7 +25,6 @@ type CCProxyMock struct { sync.Mutex t *testing.T - wg sync.WaitGroup connectionPath string // proxy socket @@ -44,6 +43,8 @@ type CCProxyMock struct { ShimDisconnected chan bool StdinReceived chan bool + wg sync.WaitGroup + stopped bool }