Bug 2284167 - Mock tries to use podman while already inside a toolbox container
Summary: Mock tries to use podman while already inside a toolbox container
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-31 23:39 UTC by Kan-Ru Chen
Modified: 2024-06-04 12:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-04 12:44:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build log (23.73 KB, text/plain)
2024-05-31 23:41 UTC, Kan-Ru Chen
no flags Details

Description Kan-Ru Chen 2024-05-31 23:39:53 UTC
Mock 5.6

Trying to fedpkg mockbuild results in the following error:

INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
ERROR: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver

In verbose log it is trying to run podman:

INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
DEBUG: child environment: None
DEBUG: Executing command: ['/usr/bin/podman', 'pull', 'registry.fedoraproject.org/fedora:rawhide'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
DEBUG: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver
DEBUG: Child return code was: 125
ERROR: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver


Reproducible: Always

Steps to Reproduce:
1. mock libchewing-0.8.4-1.fc41.src.rpm

Comment 1 Kan-Ru Chen 2024-05-31 23:41:51 UTC
Created attachment 2035941 [details]
build log

Comment 3 Kan-Ru Chen 2024-06-01 21:46:25 UTC
Hi, can you please point out what should I read from the URL?

If I follow the instruction

$ podman run --rm --privileged -ti fedora:rawhide bash
# dnf install -y mock
# useradd mockbuilder
# usermod -a -G mock mockbuilder
# su - mockbuilder
$ mock https://kojipkgs.fedoraproject.org//packages/hello/2.12.1/4.fc40/src/hello-2.12.1-4.fc40.src.rpm

Result:

INFO: mock.py version 5.6 starting (python version = 3.12.3, NVR = mock-5.6-1.fc41), args: /usr/libexec/mock/mock https://kojipkgs.fedoraproject.org//packages/hello/2.12.1/4.fc40/src/hello-2.12.1-4.fc40.src.rpm
Start(bootstrap): init plugins
INFO: selinux disabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux disabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Fetching remote file https://kojipkgs.fedoraproject.org//packages/hello/2.12.1/4.fc40/src/hello-2.12.1-4.fc40.src.rpm
INFO: Start(/tmp/tmpvkcph3oa/hello-2.12.1-4.fc40.src.rpm)  Config(fedora-rawhide-x86_64)
Start: clean chroot
Finish: clean chroot
Mock Version: 5.6
INFO: Mock Version: 5.6
Start(bootstrap): chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start(bootstrap): cleaning package manager metadata
Finish(bootstrap): cleaning package manager metadata
INFO: Guessed host environment type: unknown
INFO: Using bootstrap image: registry.fedoraproject.org/fedora:rawhide
INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
ERROR: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver

INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
ERROR: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver

INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
ERROR: Error: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph driver

======

It used to work in F40 but it doesn't work in rawhide, so I'm reporting this as regression.

Comment 4 Pavel Raiskup 2024-06-02 06:28:44 UTC
Can you retry with `podman run -v /var/lib/containers ...`?

Comment 5 Kan-Ru Chen 2024-06-02 06:41:09 UTC
(In reply to Pavel Raiskup from comment #4)
> Can you retry with `podman run -v /var/lib/containers ...`?

Yes, this works. Log:

INFO: Using bootstrap image: registry.fedoraproject.org/fedora:rawhide
INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide
INFO: Copy content of container registry.fedoraproject.org/fedora:rawhide to /var/lib/mock/fedora-rawhide-x86_64-bootstrap/root
INFO: Checking that registry.fedoraproject.org/fedora:rawhide image matches host's architecture
INFO: mounting registry.fedoraproject.org/fedora:rawhide with podman image mount
INFO: image registry.fedoraproject.org/fedora:rawhide as /var/lib/containers/storage/overlay/464515bd48ac736c979fe8c8c0b2b932d92d783be7c10400074bda134cb02631/merged
INFO: umounting image registry.fedoraproject.org/fedora:rawhide (/var/lib/containers/storage/overlay/464515bd48ac736c979fe8c8c0b2b932d92d783be7c10400074bda134cb02631/merged) with podman image umount

Is this a regression of toolbox, podman, or mock? I don't think toolbox has options to mount additional volumes.

Comment 6 Pavel Raiskup 2024-06-04 07:05:50 UTC
I bet that `fuse-overlayfs` package got dropped from the Rawhide toolbox.

I'm not sure what to do about this in Mock.  We can add a weak requirement
(Suggests) but that's going to affect everyone, even users that do not run
Mock in container.

We could throw a warning (when in container, and no fuse-overlayfs exists),
but again this would warn everybody, even those that use
`VOLUME: /var/lib/containers`.

Ideas?  Note that this is not a build failure actually...  Mock continues
working, but the fallback to manual bootstrap chroot installation is rather
slow.

Comment 7 Miroslav Suchý 2024-06-04 08:07:34 UTC
Adding weak deps and mentioning it in documentation sounds like a good plan to me.

Comment 8 Pavel Raiskup 2024-06-04 12:44:18 UTC
Ok, that sounds fine to me, moving upstream:
https://github.com/rpm-software-management/mock/issues/1381


Note You need to log in before you can comment on or make changes to this bug.