[arvados] updated: 2.1.0-2565-gbac1772ab

git repository hosting git at public.arvados.org
Thu Jun 2 15:56:55 UTC 2022


Summary of changes:
 cmd/arvados-package/build.go   |  3 ++-
 cmd/arvados-package/install.go |  3 ++-
 lib/crunchrun/docker.go        | 10 +++++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

       via  bac1772ab074713e3c50632a4cad3cc1ce50d0ec (commit)
      from  bad877eb1d1a84d25c1fab3592e4218774816179 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit bac1772ab074713e3c50632a4cad3cc1ce50d0ec
Author: Tom Clegg <tom at curii.com>
Date:   Thu Jun 2 11:56:33 2022 -0400

    15370: Bump docker API version to 1.35.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/cmd/arvados-package/build.go b/cmd/arvados-package/build.go
index 68dda8a5e..9841c890b 100644
--- a/cmd/arvados-package/build.go
+++ b/cmd/arvados-package/build.go
@@ -16,6 +16,7 @@ import (
 	"path/filepath"
 	"strings"
 
+	"git.arvados.org/arvados.git/lib/crunchrun"
 	"git.arvados.org/arvados.git/sdk/go/ctxlog"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/client"
@@ -137,7 +138,7 @@ func build(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Wr
 }
 
 func dockerRm(ctx context.Context, name string) error {
-	cli, err := client.NewClient(client.DefaultDockerHost, "1.21", nil, nil)
+	cli, err := client.NewClient(client.DefaultDockerHost, crunchrun.DockerAPIVersion, nil, nil)
 	if err != nil {
 		return err
 	}
diff --git a/cmd/arvados-package/install.go b/cmd/arvados-package/install.go
index 437a1ad21..d8dbdcc4a 100644
--- a/cmd/arvados-package/install.go
+++ b/cmd/arvados-package/install.go
@@ -14,6 +14,7 @@ import (
 	"path/filepath"
 	"strings"
 
+	"git.arvados.org/arvados.git/lib/crunchrun"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/client"
 )
@@ -134,7 +135,7 @@ exec arvados-server boot -listen-host=0.0.0.0 -no-workbench2=false $bootargs
 }
 
 func dockerImageExists(ctx context.Context, name string) (bool, error) {
-	cli, err := client.NewClient(client.DefaultDockerHost, "1.21", nil, nil)
+	cli, err := client.NewClient(client.DefaultDockerHost, crunchrun.DockerAPIVersion, nil, nil)
 	if err != nil {
 		return false, err
 	}
diff --git a/lib/crunchrun/docker.go b/lib/crunchrun/docker.go
index eee8f1d76..54d0e680f 100644
--- a/lib/crunchrun/docker.go
+++ b/lib/crunchrun/docker.go
@@ -23,6 +23,14 @@ import (
 // Docker daemon won't let you set a limit less than ~10 MiB
 const minDockerRAM = int64(16 * 1024 * 1024)
 
+// DockerAPIVersion is the API version we use to communicate with the
+// docker service.  The oldest OS we support is Ubuntu 18.04 (bionic)
+// which originally shipped docker 1.17.12 / API 1.35 so there is no
+// reason to use an older API version.  See
+// https://dev.arvados.org/issues/15370#note-38 and
+// https://docs.docker.com/engine/api/.
+const DockerAPIVersion = "1.35"
+
 type dockerExecutor struct {
 	containerUUID    string
 	logf             func(string, ...interface{})
@@ -37,7 +45,7 @@ type dockerExecutor struct {
 func newDockerExecutor(containerUUID string, logf func(string, ...interface{}), watchdogInterval time.Duration) (*dockerExecutor, error) {
 	// API version 1.21 corresponds to Docker 1.9, which is
 	// currently the minimum version we want to support.
-	client, err := dockerclient.NewClient(dockerclient.DefaultDockerHost, "1.21", nil, nil)
+	client, err := dockerclient.NewClient(dockerclient.DefaultDockerHost, DockerAPIVersion, nil, nil)
 	if watchdogInterval < 1 {
 		watchdogInterval = time.Minute
 	}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list