docker: update to 1.13.0

This commit is contained in:
Lukas Rusak 2017-01-20 14:55:24 -08:00
parent e673e34ace
commit f98ac99f20
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
5 changed files with 176 additions and 58 deletions

View File

@ -1,3 +1,8 @@
8.1.112
- Update to docker 1.13.0
- Use journald log driver
- Add docker-init (tini)
8.1.111
- Add temporary cleanup for old systemd service

View File

@ -17,14 +17,14 @@
################################################################################
PKG_NAME="docker"
PKG_VERSION="1.12.5"
PKG_REV="111"
PKG_VERSION="1.13.0"
PKG_REV="112"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="Generic RPi RPi2 imx6 WeTek_Hub WeTek_Play_2 Odroid_C2"
PKG_LICENSE="ASL"
PKG_SITE="http://www.docker.com/"
PKG_URL="https://github.com/docker/docker/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc"
PKG_DEPENDS_TARGET="toolchain sqlite go:host containerd runc libnetwork tini"
PKG_SECTION="service/system"
PKG_SHORTDESC="Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere."
PKG_LONGDESC="Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above."
@ -68,11 +68,13 @@ configure_target() {
export CGO_CFLAGS=$CFLAGS
export LDFLAGS="-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld $CC"
export GOLANG=$ROOT/$TOOLCHAIN/lib/golang/bin/go
export GOPATH=$ROOT/$PKG_BUILD/.gopath:$ROOT/$PKG_BUILD/vendor
export GOPATH=$ROOT/$PKG_BUILD/.gopath
export GOROOT=$ROOT/$TOOLCHAIN/lib/golang
export PATH=$PATH:$GOROOT/bin
ln -fs $ROOT/$PKG_BUILD $ROOT/$PKG_BUILD/vendor/src/github.com/docker/docker
mkdir -p $ROOT/$PKG_BUILD/.gopath
mv $ROOT/$PKG_BUILD/vendor $ROOT/$PKG_BUILD/.gopath/src
ln -fs $ROOT/$PKG_BUILD $ROOT/$PKG_BUILD/.gopath/src/github.com/docker/docker
# used for docker version
export GITCOMMIT=$PKG_VERSION
@ -85,7 +87,6 @@ make_target() {
mkdir -p bin
$GOLANG build -v -o bin/docker -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS" ./cmd/docker
$GOLANG build -v -o bin/dockerd -a -tags "$DOCKER_BUILDTAGS" -ldflags "$LDFLAGS" ./cmd/dockerd
$GOLANG build -v -o bin/docker-proxy -a -ldflags "$LDFLAGS" ./vendor/src/github.com/docker/libnetwork/cmd/proxy
}
makeinstall_target() {
@ -96,12 +97,17 @@ addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $ROOT/$PKG_BUILD/bin/docker $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $ROOT/$PKG_BUILD/bin/dockerd $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $ROOT/$PKG_BUILD/bin/docker-proxy $ADDON_BUILD/$PKG_ADDON_ID/bin
# containerd
cp -P $(get_build_dir containerd)/bin/containerd $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-containerd
cp -P $(get_build_dir containerd)/bin/containerd-shim $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-containerd-shim
# libnetwork
cp -P $(get_build_dir libnetwork)/bin/docker-proxy $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-proxy
# runc
cp -P $(get_build_dir runc)/bin/runc $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-runc
# tini
cp -P $(get_build_dir tini)/.$TARGET_NAME/tini-static $ADDON_BUILD/$PKG_ADDON_ID/bin/docker-init
}

View File

@ -2,20 +2,20 @@
# find . -name "*.go" -print | xargs sed -i 's/\/etc\/docker/\/storage\/.kodi\/userdata\/addon_data\/service.system.docker\/config/g'
diff -Naur a/cmd/dockerd/daemon_solaris.go b/cmd/dockerd/daemon_solaris.go
--- a/cmd/dockerd/daemon_solaris.go 2016-06-17 13:28:45.000000000 -0700
+++ b/cmd/dockerd/daemon_solaris.go 2016-06-23 10:53:28.544141675 -0700
--- a/cmd/dockerd/daemon_solaris.go 2016-12-16 02:10:49.000000000 -0800
+++ b/cmd/dockerd/daemon_solaris.go 2017-01-01 23:25:18.558212694 -0800
@@ -39,7 +39,7 @@
}
func getDaemonConfDir() string {
func getDaemonConfDir(_ string) string {
- return "/etc/docker"
+ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
}
// setupConfigReloadTrap configures the USR2 signal to reload the configuration.
diff -Naur a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go
--- a/cmd/dockerd/daemon_unix.go 2016-06-17 13:28:45.000000000 -0700
+++ b/cmd/dockerd/daemon_unix.go 2016-06-23 10:53:28.542141655 -0700
--- a/cmd/dockerd/daemon_unix.go 2016-12-16 02:10:49.000000000 -0800
+++ b/cmd/dockerd/daemon_unix.go 2017-01-01 23:25:18.560212712 -0800
@@ -18,7 +18,7 @@
"github.com/docker/libnetwork/portallocator"
)
@ -28,15 +28,15 @@ diff -Naur a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go
@@ -44,7 +44,7 @@
}
func getDaemonConfDir() string {
func getDaemonConfDir(_ string) string {
- return "/etc/docker"
+ return "/storage/.kodi/userdata/addon_data/service.system.docker/config"
}
// setupConfigReloadTrap configures the USR2 signal to reload the configuration.
diff -Naur a/integration-cli/docker_cli_authz_unix_test.go b/integration-cli/docker_cli_authz_unix_test.go
--- a/integration-cli/docker_cli_authz_unix_test.go 2016-06-17 13:28:45.000000000 -0700
+++ b/integration-cli/docker_cli_authz_unix_test.go 2016-06-23 10:53:28.339139631 -0700
--- a/integration-cli/docker_cli_authz_unix_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_authz_unix_test.go 2017-01-01 23:25:17.908206740 -0800
@@ -142,10 +142,10 @@
w.Write(b)
})
@ -60,9 +60,9 @@ diff -Naur a/integration-cli/docker_cli_authz_unix_test.go b/integration-cli/doc
}
diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go
--- a/integration-cli/docker_cli_daemon_test.go 2016-06-17 13:28:45.000000000 -0700
+++ b/integration-cli/docker_cli_daemon_test.go 2016-06-23 10:53:28.411140349 -0700
@@ -553,13 +553,13 @@
--- a/integration-cli/docker_cli_daemon_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_daemon_test.go 2017-01-01 23:25:17.939207024 -0800
@@ -541,13 +541,13 @@
func (s *DockerDaemonSuite) TestDaemonKeyGeneration(c *check.C) {
// TODO: skip or update for Windows daemon
@ -78,7 +78,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
if err != nil {
c.Fatalf("Error opening key file")
}
@@ -572,7 +572,7 @@
@@ -560,7 +560,7 @@
func (s *DockerDaemonSuite) TestDaemonKeyMigration(c *check.C) {
// TODO: skip or update for Windows daemon
@ -87,7 +87,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
k1, err := libtrust.GenerateECP256PrivateKey()
if err != nil {
c.Fatalf("Error generating private key: %s", err)
@@ -589,7 +589,7 @@
@@ -577,7 +577,7 @@
}
s.d.Stop()
@ -96,7 +96,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
if err != nil {
c.Fatalf("Error opening key file")
}
@@ -1337,7 +1337,7 @@
@@ -1300,7 +1300,7 @@
Y string `json:"y"`
}
@ -105,7 +105,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
if err := s.d.Start(); err != nil {
c.Fatalf("Failed to start daemon: %v", err)
}
@@ -1347,7 +1347,7 @@
@@ -1310,7 +1310,7 @@
}
config := &Config{}
@ -114,7 +114,7 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
if err != nil {
c.Fatalf("Error reading key.json file: %s", err)
}
@@ -1367,11 +1367,11 @@
@@ -1330,11 +1330,11 @@
}
// write back
@ -129,9 +129,9 @@ diff -Naur a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_
if err := s.d.Start(); err == nil {
c.Fatalf("It should not be successful to start daemon with wrong key: %v", err)
diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/integration-cli/docker_cli_external_graphdriver_unix_test.go
--- a/integration-cli/docker_cli_external_graphdriver_unix_test.go 2016-06-17 13:28:45.000000000 -0700
+++ b/integration-cli/docker_cli_external_graphdriver_unix_test.go 2016-06-23 10:53:28.444140678 -0700
@@ -321,10 +321,10 @@
--- a/integration-cli/docker_cli_external_graphdriver_unix_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_external_graphdriver_unix_test.go 2017-01-01 23:25:17.932206960 -0800
@@ -320,10 +320,10 @@
respond(w, &graphDriverResponse{Size: size})
})
@ -145,7 +145,7 @@ diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/inte
err = ioutil.WriteFile(specFile, b, 0644)
c.Assert(err, check.IsNil, check.Commentf("error writing to %s", specFile))
}
@@ -333,8 +333,8 @@
@@ -332,8 +332,8 @@
s.server.Close()
s.jserver.Close()
@ -157,9 +157,9 @@ diff -Naur a/integration-cli/docker_cli_external_graphdriver_unix_test.go b/inte
func (s *DockerExternalGraphdriverSuite) TestExternalGraphDriver(c *check.C) {
diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/integration-cli/docker_cli_external_volume_driver_unix_test.go
--- a/integration-cli/docker_cli_external_volume_driver_unix_test.go 2016-06-17 13:28:45.000000000 -0700
+++ b/integration-cli/docker_cli_external_volume_driver_unix_test.go 2016-06-23 10:53:28.435140588 -0700
@@ -239,17 +239,17 @@
--- a/integration-cli/docker_cli_external_volume_driver_unix_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_external_volume_driver_unix_test.go 2017-01-01 23:25:17.931206951 -0800
@@ -264,10 +264,10 @@
send(w, `{"Capabilities": { "Scope": "global" }}`)
})
@ -167,20 +167,21 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
c.Assert(err, checker.IsNil)
- err = ioutil.WriteFile("/etc/docker/plugins/test-external-volume-driver.spec", []byte(s.server.URL), 0644)
+ err = ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/test-external-volume-driver.spec", []byte(s.server.URL), 0644)
- err = ioutil.WriteFile("/etc/docker/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
+ err = ioutil.WriteFile("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/"+name+".spec", []byte(s.Server.URL), 0644)
c.Assert(err, checker.IsNil)
return s
}
@@ -275,7 +275,7 @@
func (s *DockerExternalVolumeSuite) TearDownSuite(c *check.C) {
s.server.Close()
s.volumePlugin.Close()
- err := os.RemoveAll("/etc/docker/plugins")
+ err := os.RemoveAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins")
c.Assert(err, checker.IsNil)
}
@@ -334,7 +334,7 @@
@@ -376,7 +376,7 @@
// Make sure a request to use a down driver doesn't block other requests
func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *check.C) {
@ -189,7 +190,7 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
err := ioutil.WriteFile(specPath, []byte("tcp://127.0.0.7:9999"), 0644)
c.Assert(err, check.IsNil)
defer os.RemoveAll(specPath)
@@ -373,7 +373,7 @@
@@ -415,7 +415,7 @@
err := s.d.StartWithBusybox()
c.Assert(err, checker.IsNil)
@ -199,9 +200,9 @@ diff -Naur a/integration-cli/docker_cli_external_volume_driver_unix_test.go b/in
defer os.RemoveAll(specPath)
diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go
--- a/integration-cli/docker_cli_network_unix_test.go 2016-06-17 13:28:45.000000000 -0700
+++ b/integration-cli/docker_cli_network_unix_test.go 2016-06-23 10:53:28.441140648 -0700
@@ -201,14 +201,14 @@
--- a/integration-cli/docker_cli_network_unix_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_network_unix_test.go 2017-01-01 23:25:17.896206630 -0800
@@ -203,14 +203,14 @@
}
})
@ -219,7 +220,7 @@ diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/d
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
c.Assert(err, checker.IsNil)
}
@@ -220,7 +220,7 @@
@@ -222,7 +222,7 @@
s.server.Close()
@ -228,21 +229,39 @@ diff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/d
c.Assert(err, checker.IsNil)
}
diff -Naur a/pkg/plugins/discovery.go b/pkg/plugins/discovery.go
--- a/pkg/plugins/discovery.go 2016-06-17 13:28:45.000000000 -0700
+++ b/pkg/plugins/discovery.go 2016-06-23 10:53:28.636142593 -0700
@@ -16,7 +16,7 @@
// ErrNotFound plugin not found
ErrNotFound = errors.New("plugin not found")
socketsPath = "/run/docker/plugins"
- specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
+ specsPaths = []string{"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", "/usr/lib/docker/plugins"}
)
diff -Naur a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go
--- a/integration-cli/docker_cli_swarm_test.go 2016-12-16 02:10:49.000000000 -0800
+++ b/integration-cli/docker_cli_swarm_test.go 2017-01-01 23:25:17.919206841 -0800
@@ -659,14 +659,14 @@
}
})
// localRegistry defines a registry that is local (using unix socket).
- err := os.MkdirAll("/etc/docker/plugins", 0755)
+ err := os.MkdirAll("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", 0755)
c.Assert(err, checker.IsNil)
- fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
+ fileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", netDrv)
err = ioutil.WriteFile(fileName, []byte(url), 0644)
c.Assert(err, checker.IsNil)
- ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
+ ipamFileName := fmt.Sprintf("/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec", ipamDrv)
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
c.Assert(err, checker.IsNil)
}
diff -Naur a/pkg/plugins/discovery_unix.go b/pkg/plugins/discovery_unix.go
--- a/pkg/plugins/discovery_unix.go 2016-12-16 02:10:49.000000000 -0800
+++ b/pkg/plugins/discovery_unix.go 2017-01-01 23:25:17.977207372 -0800
@@ -2,4 +2,4 @@
package plugins
-var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"}
+var specsPaths = []string{"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins", "/usr/lib/docker/plugins"}
diff -Naur a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go
--- a/pkg/plugins/plugins.go 2016-06-17 13:28:45.000000000 -0700
+++ b/pkg/plugins/plugins.go 2016-06-23 10:53:28.636142593 -0700
--- a/pkg/plugins/plugins.go 2016-12-16 02:10:49.000000000 -0800
+++ b/pkg/plugins/plugins.go 2017-01-01 23:25:17.977207372 -0800
@@ -4,7 +4,7 @@
// Docker discovers plugins by looking for them in the plugin directory whenever
// a user or container tries to use one by name. UNIX domain socket files must
@ -253,9 +272,9 @@ diff -Naur a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go
// its name if it exists.
//
diff -Naur a/registry/config_unix.go b/registry/config_unix.go
--- a/registry/config_unix.go 2016-06-17 13:28:45.000000000 -0700
+++ b/registry/config_unix.go 2016-06-23 10:53:28.594142174 -0700
@@ -4,7 +4,7 @@
--- a/registry/config_unix.go 2016-12-16 02:10:49.000000000 -0800
+++ b/registry/config_unix.go 2017-01-01 23:25:18.578212877 -0800
@@ -8,7 +8,7 @@
var (
// CertsDir is the directory where certificates are stored
@ -265,8 +284,8 @@ diff -Naur a/registry/config_unix.go b/registry/config_unix.go
// cleanPath is used to ensure that a directory name is valid on the target
diff -Naur a/registry/endpoint_v1.go b/registry/endpoint_v1.go
--- a/registry/endpoint_v1.go 2016-06-17 13:28:45.000000000 -0700
+++ b/registry/endpoint_v1.go 2016-06-23 10:53:28.593142164 -0700
--- a/registry/endpoint_v1.go 2016-12-16 02:10:49.000000000 -0800
+++ b/registry/endpoint_v1.go 2017-01-01 23:25:18.584212932 -0800
@@ -49,7 +49,7 @@
if endpoint.IsSecure {
// If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`

View File

@ -0,0 +1,60 @@
commit 472c4da2e78a01b4fcf194c2c85edde4fc32aa0b
Author: Sebastiaan van Stijn <github@gone.nl>
Date: Tue Jan 3 14:54:30 2017 +0100
do not create init-dir if not needed
commit 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
added support for cpu-rt-period and cpu-rt-runtime,
but always initialized the cgroup path, even if not
used.
As a result, containers failed to start on a
read-only filesystem.
This patch only creates the cgroup path if
one of these options is set.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go
index 56e980d..5b3ffeb 100644
--- a/daemon/daemon_unix.go
+++ b/daemon/daemon_unix.go
@@ -1190,6 +1190,12 @@ func (daemon *Daemon) initCgroupsPath(path string) error {
return nil
}
+ if daemon.configStore.CPURealtimePeriod == 0 && daemon.configStore.CPURealtimeRuntime == 0 {
+ return nil
+ }
+
+ // Recursively create cgroup to ensure that the system and all parent cgroups have values set
+ // for the period and runtime as this limits what the children can be set to.
daemon.initCgroupsPath(filepath.Dir(path))
_, root, err := cgroups.FindCgroupMountpointAndRoot("cpu")
@@ -1198,16 +1204,19 @@ func (daemon *Daemon) initCgroupsPath(path string) error {
}
path = filepath.Join(root, path)
- sysinfo := sysinfo.New(false)
- if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
- return err
- }
+ sysinfo := sysinfo.New(true)
if sysinfo.CPURealtimePeriod && daemon.configStore.CPURealtimePeriod != 0 {
+ if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
+ return err
+ }
if err := ioutil.WriteFile(filepath.Join(path, "cpu.rt_period_us"), []byte(strconv.FormatInt(daemon.configStore.CPURealtimePeriod, 10)), 0700); err != nil {
return err
}
}
if sysinfo.CPURealtimeRuntime && daemon.configStore.CPURealtimeRuntime != 0 {
+ if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
+ return err
+ }
if err := ioutil.WriteFile(filepath.Join(path, "cpu.rt_runtime_us"), []byte(strconv.FormatInt(daemon.configStore.CPURealtimeRuntime, 10)), 0700); err != nil {
return err
}

View File

@ -0,0 +1,28 @@
commit 51ed00db7df80caad3c3d2b136ee5578cedb7e31
Author: Lukas Rusak <lorusak@gmail.com>
Date: Fri Jan 13 13:54:42 2017 -0800
use short expected commit values
diff --git a/daemon/info_unix.go b/daemon/info_unix.go
index 9c41c0e..4e0e896 100644
--- a/daemon/info_unix.go
+++ b/daemon/info_unix.go
@@ -27,7 +27,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
v.DefaultRuntime = daemon.configStore.GetDefaultRuntimeName()
v.InitBinary = daemon.configStore.GetInitPath()
- v.ContainerdCommit.Expected = dockerversion.ContainerdCommitID
+ v.ContainerdCommit.Expected = dockerversion.ContainerdCommitID[0:7]
if sv, err := daemon.containerd.GetServerVersion(context.Background()); err == nil {
v.ContainerdCommit.ID = sv.Revision
} else {
@@ -35,7 +35,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
v.ContainerdCommit.ID = "N/A"
}
- v.RuncCommit.Expected = dockerversion.RuncCommitID
+ v.RuncCommit.Expected = dockerversion.RuncCommitID[0:7]
if rv, err := exec.Command(DefaultRuntimeBinary, "--version").Output(); err == nil {
parts := strings.Split(strings.TrimSpace(string(rv)), "\n")
if len(parts) == 3 {