Skip to contentSkip to conversation

get docker working again (broken by per recipe sysroots)

PATCH In review Mark Asselstine 3 participants 8 messages Feb 10, 2017 – Feb 21, 2017

lore
Share & tools
lore
#0 lore raw

cover get docker working again (broken by per recipe sysroots)

By uprev'ing runc and containerd to the versions specified by docker's vendor.conf file we are able to get the docker runtime back to a fully functional state (ie. it now passes some basic usecases)

This series is applied on top of the commit sent by Jan Kiszka [containerd: Fix build on 386] but should apply with our without that merged.

It is highly unfortunate that docker is forking runc. Although we only have docker using runc at the moment this has the potential to cause issues if/when we get other runc users integrated.

With these changes we can now run docker pull, docker run, docker images, docker ps -a,... successfully. Running 'docker run hello-world' produces the expected results:

----
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

To try something more ambitious, you can run an Ubuntu container with:

  $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
----

Running 'docker info' we also see that there is no longer a mismatch reported for these dependencies.

Mark

#1 lore raw

PATCH 1/2 containerd: uprev to version required by docker 1.13.0

Docker defines required dependency versions in its vendor.conf file. These can also be validated by running 'docker info' on the running system. In order to avoid issues, such as the current one where docker can't run containers, we need to ensure we match these versions. Uprev containerd to the version defined in docker's vendor.conf file.

---
 recipes-containers/containerd/containerd_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/containerd/containerd_git.bb +3 -3
index 5b94dde..67011a3 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "containerd is a daemon to control runC, built for performance and
                containerd leverages runC's advanced features such as seccomp and user namespace \
                support as well as checkpoint and restore for cloning and live migration of containers."
 
-SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
+SRCREV = "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
 SRC_URI = "\
-	git://github.com/docker/containerd.git;nobranch=1 \
+	git://github.com/docker/containerd.git;branch=docker-1.13.x \
 	"
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
 
 S = "${WORKDIR}/git"
 
-CONTAINERD_VERSION = "0.2.2"
+CONTAINERD_VERSION = "0.2.3"
 PV = "${CONTAINERD_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/2] containerd: uprev to version required by docker 1.13.0

Quoted 7 lines · Mark Asselstine

Docker defines required dependency versions in its vendor.conf file. These can also be validated by running 'docker info' on the running system. In order to avoid issues, such as the current one where docker can't run containers, we need to ensure we match these versions. Uprev containerd to the version defined in docker's vendor.conf file.

Similar to runc, we need to create a new docker-containerd package, and a .inc file if elements needs to be shared.

docker can't dictate the versions of these packages.

Bruce

Quoted 31 lines
---
 recipes-containers/containerd/containerd_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/containerd/containerd_git.bb +3 -3
index 5b94dde..67011a3 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "containerd is a daemon to control runC, built for performance and
                containerd leverages runC's advanced features such as seccomp and user namespace \
                support as well as checkpoint and restore for cloning and live migration of containers."
 
-SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
+SRCREV = "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
 SRC_URI = "\
-	git://github.com/docker/containerd.git;nobranch=1 \
+	git://github.com/docker/containerd.git;branch=docker-1.13.x \
 	"
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
 
 S = "${WORKDIR}/git"
 
-CONTAINERD_VERSION = "0.2.2"
+CONTAINERD_VERSION = "0.2.3"
 PV = "${CONTAINERD_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \
#3 lore raw

PATCH 2/2 runc: uprev to version required by docker 1.13.0

In reply to Mark Asselstine

At the moment we only use runc in conjunction with docker. In order to allow docker to function correctly we need to use the version specified in docker's vendor.conf file. Uprev runc to this version.

NOTE that the docker folks have actually forked runc and I have used this fork as the SRC_URI. I could have chosen instead to use the old SRC_URI along with the fork point commit as the SRCREV, and then applied the 2 commits the docker team have added beyond the fork. I opted instead to use the fork such that 'docker info' would not complain about a version mismatch. This also makes it easier to google for issues since the commit ID matches.

NOTE when we eventually have more users of runc we will have to determine a strategy to either have them all use the same version or allow for multiple versions of runc on the system. This is also true for containerd.

---
 recipes-containers/runc/runc_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/runc/runc_git.bb +3 -3
index 23c0094..c5cf40b 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "runc is a CLI tool for spawning and running containers according
 
 # Note: this rev is before the required protocol field, update when all components
 #       have been updated to match.
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
+SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
 SRC_URI = "\
-	git://github.com/opencontainers/runc;branch=master \
+	git://github.com/docker/runc.git;nobranch=1 \
 	"
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
 
 S = "${WORKDIR}/git"
 
-RUNC_VERSION = "1.0.0-rc1"
+RUNC_VERSION = "1.0.0-rc2"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \
Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH 2/2] runc: uprev to version required by docker 1.13.0

Quoted 12 lines · Mark Asselstine

At the moment we only use runc in conjunction with docker. In order to allow docker to function correctly we need to use the version specified in docker's vendor.conf file. Uprev runc to this version.

NOTE that the docker folks have actually forked runc and I have used this fork as the SRC_URI. I could have chosen instead to use the old SRC_URI along with the fork point commit as the SRCREV, and then applied the 2 commits the docker team have added beyond the fork. I opted instead to use the fork such that 'docker info' would not complain about a version mismatch. This also makes it easier to google for issues since the commit ID matches.

Quoted 4 lines

NOTE when we eventually have more users of runc we will have to determine a strategy to either have them all use the same version or allow for multiple versions of runc on the system. This is also true for containerd.

We already have more users of runc, so I unfortunately can't take this uprev at the moment.

There doesn't have to be multiple versions on the target, but we need to split the package into "docker-runc" and "runc", which is what other distros tend to do.

So I can't take this update at the moment, and we'll have to work on the package split before we can do the update. We need all the components to be individually updated without docker dictating the revisions.

Bruce

Quoted 32 lines
---
 recipes-containers/runc/runc_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/runc/runc_git.bb +3 -3
index 23c0094..c5cf40b 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "runc is a CLI tool for spawning and running containers according
 
 # Note: this rev is before the required protocol field, update when all components
 #       have been updated to match.
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
+SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
 SRC_URI = "\
-	git://github.com/opencontainers/runc;branch=master \
+	git://github.com/docker/runc.git;nobranch=1 \
 	"
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
 
 S = "${WORKDIR}/git"
 
-RUNC_VERSION = "1.0.0-rc1"
+RUNC_VERSION = "1.0.0-rc2"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \
#5 lore raw

Re: [PATCH 2/2] runc: uprev to version required by docker 1.13.0

Quoted 20 lines · Bruce Ashfield
Quoted 13 lines · Mark Asselstine

At the moment we only use runc in conjunction with docker. In order to allow docker to function correctly we need to use the version specified in docker's vendor.conf file. Uprev runc to this version.

NOTE that the docker folks have actually forked runc and I have used this fork as the SRC_URI. I could have chosen instead to use the old SRC_URI along with the fork point commit as the SRCREV, and then applied the 2 commits the docker team have added beyond the fork. I opted instead to use the fork such that 'docker info' would not complain about a version mismatch. This also makes it easier to google for issues since the commit ID matches.

Quoted 4 lines

NOTE when we eventually have more users of runc we will have to determine a strategy to either have them all use the same version or allow for multiple versions of runc on the system. This is also true for containerd.

Quoted 4 lines

We already have more users of runc, so I unfortunately can't take this uprev at the moment.

There doesn't have to be multiple versions on the target,

OK, as long as we are not expecting multiple version on the target at the same time the split is a good approach and I can make this happen. I will send a V2 with these changes.

Mark

Quoted 53 lines

but we
need to split the package into "docker-runc" and "runc", which is what other distros tend to do.

So I can't take this update at the moment, and we'll have to work on the package split before we can do the update. We need all the components to be individually updated without docker dictating the revisions.

Bruce

Quoted 31 lines
---
 recipes-containers/runc/runc_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/runc/runc_git.bb +0 -0
index 23c0094..c5cf40b 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "runc is a CLI tool for spawning and running

containers according

# Note: this rev is before the required protocol field, update when all
components
# have been updated to match.

recipes-containers/runc/runc_git.bb +2 -2
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
+SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
 SRC_URI = "\
-       git://github.com/opencontainers/runc;branch=master \
+       git://github.com/docker/runc.git;nobranch=1 \
        "
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM =

"file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"

S = "${WORKDIR}/git"

recipes-containers/runc/runc_git.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" · line 21

Quoted 5 lines
recipes-containers/runc/runc_git.bb +1 -1
-RUNC_VERSION = "1.0.0-rc1"
+RUNC_VERSION = "1.0.0-rc2"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#6 lore raw

Re: [PATCH 2/2] runc: uprev to version required by docker 1.13.0

Quoted 22 lines · Mark Asselstine
Quoted 20 lines · Bruce Ashfield
Quoted 17 lines · Mark Asselstine

At the moment we only use runc in conjunction with docker. In order to allow docker to function correctly we need to use the version specified in docker's vendor.conf file. Uprev runc to this version.

NOTE that the docker folks have actually forked runc and I have used this fork as the SRC_URI. I could have chosen instead to use the old SRC_URI along with the fork point commit as the SRCREV, and then applied the 2 commits the docker team have added beyond the fork. I opted instead to use the fork such that 'docker info' would not complain about a version mismatch. This also makes it easier to google for issues since the commit ID matches.

NOTE when we eventually have more users of runc we will have to determine a strategy to either have them all use the same version or allow for multiple versions of runc on the system. This is also true for containerd.

Quoted 8 lines
Quoted 4 lines

We already have more users of runc, so I unfortunately can't take this uprev at the moment.

There doesn't have to be multiple versions on the target,

OK, as long as we are not expecting multiple version on the target at the same time the split is a good approach and I can make this happen. I will send a V2 with these changes.

Yep, just make docker-runc conflict with runc, and docker-containerd conflict with containerd.

That way the crimes are fully visible :D

Bruce

Quoted 57 lines

Mark

Quoted 53 lines

but we
need to split the package into "docker-runc" and "runc", which is what other distros tend to do.

So I can't take this update at the moment, and we'll have to work on the package split before we can do the update. We need all the components to be individually updated without docker dictating the revisions.

Bruce

Quoted 31 lines
---
 recipes-containers/runc/runc_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/runc/runc_git.bb +0 -0
index 23c0094..c5cf40b 100644
@@ -4,9 +4,9 @@ DESCRIPTION = "runc is a CLI tool for spawning and running

containers according

# Note: this rev is before the required protocol field, update when all
components
# have been updated to match.

recipes-containers/runc/runc_git.bb +2 -2
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
+SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
 SRC_URI = "\
-       git://github.com/opencontainers/runc;branch=master \
+       git://github.com/docker/runc.git;nobranch=1 \
        "
 
 # Apache-2.0 for containerd
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM =

"file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"

S = "${WORKDIR}/git"

recipes-containers/runc/runc_git.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" · line 21

Quoted 5 lines
recipes-containers/runc/runc_git.bb +1 -1
-RUNC_VERSION = "1.0.0-rc1"
+RUNC_VERSION = "1.0.0-rc2"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
 DEPENDS = "go-cross-${TARGET_ARCH} \

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#7 lore raw
In reply to Mark Asselstine

Following up to the list. I did finally merge this change after creating a virtual/run
and virtual/containerd namespace for these two packages.

I've made the default preferred provider to be runc-docker, but for someone that wants
to build the tip of the opencontainers tree, there is also a runc-opencontainers. A
similar split exists within containerd.

Once docker and the opencontainer equivalent become one, I can undo the virtual/*
namespace changes.

Bruce

Quoted 52 lines · Mark Asselstine

By uprev'ing runc and containerd to the versions specified by docker's vendor.conf file we are able to get the docker runtime back to a fully functional state (ie. it now passes some basic usecases)

This series is applied on top of the commit sent by Jan Kiszka [containerd: Fix build on 386] but should apply with our without that merged.

It is highly unfortunate that docker is forking runc. Although we only have docker using runc at the moment this has the potential to cause issues if/when we get other runc users integrated.

With these changes we can now run docker pull, docker run, docker images, docker ps -a,... successfully. Running 'docker run hello-world' produces the expected results:

----
Hello from Docker!
This message shows that your installation appears to be working
correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs
the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which
sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:

  $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
----

Running 'docker info' we also see that there is no longer a mismatch reported for these dependencies.

Mark
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"