Source: docker.io
Severity: normal
Control: block 964378 by -1
Hi,
In order to get podman 2.0 to build, I had to backport some changes to
the golang-github-docker-docker-dev package. Unfortunately they are not
included in any upstream release at time of writing. Please find
backported patches attached to this email.
In addition to applying these patches, I had to disable some CLI tests,
because the CLI tests compare the output of the docker tool, and the
patches include additional information (osrelease and variant). I did
this by editing debian/rules:
@@ -154,8 +154,9 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
&& TESTFLAGS='-test.short' ./hack/test/unit
## Test CLI:
- cd $(OUR_GOPATH)/src/github.com/docker/cli \
-&& DISABLE_WARN_OUTSIDE_CONTAINER=1 $(MAKE) test-unit
+ # disabled as backported upstream patches change the command output
+ #cd $(OUR_GOPATH)/src/github.com/docker/cli \
+#&& DISABLE_WARN_OUTSIDE_CONTAINER=1 $(MAKE) test-unit
.gopath/bin/containerd -version
endif
A better approach would be to update the reference pattern the tests is
comparing against, but I failed to figure out how to do so.
Any chance we could have that patch in experimental soon? AFAIUI, this
is the last bit that prevents uploading podman 2.0.
Thanks!
>From 30db6a727e6daad6f36ede7e132703dc8b58e19b Mon Sep 17 00:00:00 2001
From: Jean Rouge
Date: Thu, 30 May 2019 09:51:41 -0700
Subject: [PATCH] Adding OS version info to the nodes' `Info` struct
This is needed so that we can add OS version constraints in Swarmkit, which
does require the engine to report its host's OS version (see
https://github.com/docker/swarmkit/issues/2770).
The OS version is parsed from the `os-release` file on Linux, and from the
`ReleaseId` string value of the `SOFTWARE\Microsoft\Windows NT\CurrentVersion`
registry key on Windows.
Added unit tests when possible, as well as Prometheus metrics.
Signed-off-by: Jean Rouge
Upstream-commit: d363a1881ec256e1be5a48a90046ff16e84ddc02
Component: engine
---
engine/api/swagger.yaml| 11 ++
engine/api/types/types.go | 1 +
engine/daemon/daemon.go| 1 +
engine/daemon/info.go | 23 ++-
engine/daemon/metrics.go | 6 +-
.../operatingsystem/operatingsystem_linux.go | 41 +++--
..._test.go => operatingsystem_linux_test.go} | 146 +++---
.../operatingsystem/operatingsystem_unix.go | 7 +
.../operatingsystem_windows.go| 68
9 files changed, 208 insertions(+), 96 deletions(-)
rename engine/pkg/parsers/operatingsystem/{operatingsystem_unix_test.go => operatingsystem_linux_test.go} (64%)
--- a/engine/api/swagger.yaml
+++ b/engine/api/swagger.yaml
@@ -3998,6 +3998,17 @@
or "Windows Server 2016 Datacenter"
type: "string"
example: "Alpine Linux v3.5"
+ OSVersion:
+description: |
+ Version of the host's operating system
+
+
+
+ > **Note**: The information returned in this field, including its
+ > very existence, and the formatting of values, should not be considered
+ > stable, and may change without notice.
+type: "string"
+example: "16.04"
OSType:
description: |
Generic type of the operating system of the host, as returned by the
--- a/engine/api/types/types.go
+++ b/engine/api/types/types.go
@@ -177,6 +177,7 @@
NEventsListenerint
KernelVersion string
OperatingSystemstring
+ OSVersion string
OSType string
Architecture string
IndexServerAddress string
--- a/engine/daemon/daemon.go
+++ b/engine/daemon/daemon.go
@@ -1080,6 +1080,7 @@
info.KernelVersion,
info.OperatingSystem,
info.OSType,
+ info.OSVersion,
info.ID,
).Set(1)
engineCpus.Set(float64(info.NCPU))
--- a/engine/daemon/info.go
+++ b/engine/daemon/info.go
@@ -21,11 +21,14 @@
"github.com/docker/docker/pkg/system"
"github.com/docker/docker/registry"
"github.com/docker/go-connections/sockets"
+ "github.com/docker/go-metrics"
"github.com/sirupsen/logrus"
)
// SystemInfo returns information about the host server the daemon is running on.
func (daemon *Daemon) SystemInfo() (*types.Info, error) {
+ defer metrics.StartTimer(hostInfoFunctions.WithValues("system_info"))()
+
sysInfo := sysinfo.New(true)
cRunning, cPaused, cStopped := stateCtr.get()
@@ -49,6 +52,7 @@
NEventsListener:daemon.EventsService.SubscribersCount(),
KernelVersion: kernelVersion(),
OperatingSystem:operatingSystem(),
+ OSVersion: osVersion(),
IndexServerAddress: registry.IndexServer,
OSType: platform.OSType,
Architecture: platform.Architecture,
@@ -82,6 +86,8 @@
// SystemVersion returns version information about the daemon.
func (daemon *Daemon) SystemVersion() types.Version {
+ defer