containers / buildah

A tool that facilitates building OCI images.
https://buildah.io
Apache License 2.0
7.44k stars 785 forks source link

Unable to commit any container to image after 1.11.6 -> 1.12.0 #2033

Closed AndydeCleyre closed 4 years ago

AndydeCleyre commented 4 years ago

Description

After upgrading 1.11.6 -> 1.12.0, committing to images fails: 'error committing container \ to \: error copying layers and metadata for container "\": Error initializing source containers-storage:: error extracting layer "\": is a directory'

I am always using buildah as a regular user.

I cleared ~/.local/share/containers/storage but same result trying to commit any ctnr.

Downgrading 1.12.0 -> 1.11.6 allows me to commit again.

Steps to reproduce the issue:

buildah rm -a
buildah rmi -af
rm -rf ~/.local/share/containers/storage
ctnr=$(buildah from alpine)
buildah commit $ctnr icycool
buildah images

Describe the results you received:

Getting image source signatures
Copying blob 89d9c30c1d48 done
Copying config 965ea09ff2 done
Writing manifest to image destination
Storing signatures

error committing container "alpine-working-container" to "icycool": error copying layers and metadata for container "e0ae1787929caf8208b22cfa486f27c8e2e51e87a01c19cde6f39772f87c4d00": Error initializing source containers-storage:alpine-working-container: error extracting layer "dca6858ba58b71e2118ef83dbc245437954d192f511eccfb784fd5e8e63a6b53": is a directory
ERRO exit status 1

REPOSITORY                 TAG      IMAGE ID       CREATED       SIZE
docker.io/library/alpine   latest   965ea09ff2eb   8 weeks ago   5.82 MB

Describe the results you expected:

Getting image source signatures
Copying blob 89d9c30c1d48 done
Copying config 965ea09ff2 done
Writing manifest to image destination
Storing signatures

Getting image source signatures
Copying blob 77cae8ab23bf skipped: already exists
Copying blob 5f70bf18a086 done
Copying config e722819604 done
Writing manifest to image destination
Storing signatures
e7228196045ebdb057c095f330e63dbdea4bd73e8267b399adc4a1c6e052a35a

REPOSITORY                 TAG      IMAGE ID       CREATED          SIZE
localhost/icycool          latest   e7228196045e   28 seconds ago   5.82 MB
docker.io/library/alpine   latest   965ea09ff2eb   8 weeks ago      5.82 MB

Output of pacman -Q buildah:

buildah 1.12.0-1

Output of buildah version:

buildah version 1.12.0 (image-spec 1.0.1-dev, runtime-spec 1.0.1-dev)

*Output of `cat /etc/release`:**

LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"

Output of uname -a:

Linux Ingram 5.4.3-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 13 Dec 2019 09:40:17 +0000 x86_64 GNU/Linux

Output of cat /etc/containers/storage.conf (comments stripped):

[storage]
driver = "overlay"
runroot = "/var/run/containers/storage"
graphroot = "/var/lib/containers/storage"
[storage.options]
additionalimagestores = [
]
size = ""
override_kernel_check = "true"
mountopt = "nodev"
[storage.options.thinpool]
ostree_repo = ""
skip_mount_home = "false"

Output of cat ~/.local/share/containers/storage.conf:

[storage]
  driver = "overlay"
  runroot = "/run/user/1000"
  graphroot = "/home/andy/.local/share/containers/storage"
  [storage.options]
    mount_program = "/bin/fuse-overlayfs"
AndydeCleyre commented 4 years ago

After a git bisect session, looks like the problem was introduced with either/both 49e35cb98a17a4619c16332a17cfd31832f8b1d6 and 3b7f0a19c41ae20302f7579140678bfc9af4bc37 (I couldn't build the first of those to test).

rhatdan commented 4 years ago

Strange this is working fine for me on Fedora 31.

AndydeCleyre commented 4 years ago

Thank @rhatdan . I've discovered the only problem was that it was about time I upgraded fuse-overlayfs: fuse-overlayfs-git (327-1) -> fuse-overlayfs (0.7.2-1) and it's all good.

rhatdan commented 4 years ago

The Buildah package should require the newer version, I guess

TomSweeneyRedHat commented 4 years ago

@lsm5 PTAL

AndydeCleyre commented 4 years ago

The Buildah package should require the newer version, I guess

Unfortunately fuse-overlayfs is not officially packaged for Arch, so the official buildah package can't depend on it there.