Comply with API changes in runc 1.0.1

Bug #1939423 reported by Lucas Kanashiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang-github-containers-buildah (Ubuntu)
Fix Released
Undecided
Unassigned
golang-github-containers-storage (Ubuntu)
Fix Released
Undecided
Unassigned
opengcs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

With the recent upload of runc version 1.0.1, the golang-github-containers-storage DEP-8 tests started to fail because of an API change in the libcontainer inside runc:

https://github.com/opencontainers/runc/commit/e7fd383bce
https://github.com/opencontainers/runc/commit/4316df8b53

The fix was applied upstream here:

https://github.com/containers/storage/commit/b3531c3df8c

This patch should be adapted (removing the changes in the vendor directory) and applied to golang-github-containers-storage to unblock runc migration.

Tags: patch
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

This is the error I've been seeing in the logs:

# github.com/containers/storage/pkg/archive
src/github.com/containers/storage/pkg/archive/archive.go:1143:16: undefined: "github.com/opencontainers/runc/libcontainer/system".RunningInUserNS
src/github.com/containers/storage/pkg/archive/archive.go:1158:14: undefined: "github.com/opencontainers/runc/libcontainer/system".RunningInUserNS
src/github.com/containers/storage/pkg/archive/archive.go:1178:14: undefined: "github.com/opencontainers/runc/libcontainer/system".RunningInUserNS
src/github.com/containers/storage/pkg/archive/archive.go:1278:25: undefined: "github.com/opencontainers/runc/libcontainer/system".RunningInUserNS
src/github.com/containers/storage/pkg/archive/archive_unix.go:91:5: undefined: "github.com/opencontainers/runc/libcontainer/system".RunningInUserNS

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

The attached debdiff fix the issue, autopkgtest with the impish-proposed pocket enabled is happy again:

autopkgtest [11:59:56]: @@@@@@@@@@@@@@@@@@@@ summary
dh-golang-autopkgtest PASS

PPA with the proposed package:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/container-stack

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Lucas.

The patch LGTM. I built the package locally and confirmed that the dep8 tests are passing.

+1.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the review Sergio! Package uploaded to impish-proposed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-github-containers-storage - 1.31.3+ds1-1ubuntu1

---------------
golang-github-containers-storage (1.31.3+ds1-1ubuntu1) impish; urgency=medium

  * d/p/support-runc-1.0.1.patch: Add patch to comply with API changes in
    libcontainer inside runc (LP: #1939423).

 -- Lucas Kanashiro <email address hidden> Tue, 10 Aug 2021 11:42:49 -0300

Changed in golang-github-containers-storage (Ubuntu):
status: New → Fix Released
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

opengcs has the very same issue with the embedded version of containerd and docker. The attached debdiff fixes this issue.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the patch, Lucas.

I could reproduce the build failure without the patch, and then verified that the patch indeed fixes the issue. The package uses autodep8; I ran the tests and they succeeded.

LGTM, +1.

tags: added: patch
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

golang-github-containers-buildah is also affected by the libcontainer API changes. The attached debdiff fixes the issue.

autopkgtest is still happy with the impish-proposed pocket enabled:

autopkgtest [13:45:30]: @@@@@@@@@@@@@@@@@@@@ summary
dh-golang-autopkgtest PASS

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

One more review for Lucas coming out :-).

I looked at debdiff and I have a few questions:

- IIUC you're not the author of the upstream patch, right?

- Forgive my ignorance, but why is the upstream patch so big while the backported patch is really small and contained? Is it because the upstream patch contemplates several more changes than just adjusting buildah to the new runc API?

- I think using "Origin: backport" instead of "Origin: upstream" would be more appropriate in this case, given that the patch needed to be manually adjusted.

I built the package locally using your patch and it works. I also verified that the autopkgtests are indeed passing. I'll wait for your reply to my questions before I give my +1.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the review Sergio (again) :)

Answering your questions:

- I am not the author, yes. I just adapted the upstream commit, I'll change this field to Reviewed-By.

- The upstream commit also updates the runc version embedded in its code, since this package does not contain vendorized deps we do not need it, just the buildah code changes.

- Sure, I'll change to backport.

The debdiff attached addresses what you mentioned.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, this LGTM. +1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package opengcs - 0.3.4+dfsg2-0ubuntu7

---------------
opengcs (0.3.4+dfsg2-0ubuntu7) impish; urgency=medium

  * d/p/0003-Add-support-for-runc-1.0.x.patch: Comply with the libcontainer
    API changes introduced in runc 1.0.x (LP: #1939423).

 -- Lucas Kanashiro <email address hidden> Thu, 12 Aug 2021 15:47:55 -0300

Changed in opengcs (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-github-containers-buildah - 1.21.3+ds1-1ubuntu1

---------------
golang-github-containers-buildah (1.21.3+ds1-1ubuntu1) impish; urgency=medium

  * d/p/support-runc-1.0.1.patch: Add patch to comply with API changes in
    libcontainer inside runc (LP: #1939423).
  * d/control: Adjust some dependencies version constraints.
    - Relax golang-github-containers-common-dev version constraint,
      use '>=' instead of '>>'. This still satisfies what upstream defines in
      go.mod.
    - Add '>= 20.10.7-0ubuntu2' to golang-github-docker-docker-dev. In this
      version, the required libnetwork component is also shipped.

 -- Lucas Kanashiro <email address hidden> Fri, 13 Aug 2021 10:55:02 -0300

Changed in golang-github-containers-buildah (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.