#264 *Fedora CI - scratch build* fails to create SRPM (at least on rawhide)
Closed by msrb. Opened by churchyard.

in here:

https://src.fedoraproject.org/rpms/python-envisage/pull-request/2

And here:

https://src.fedoraproject.org/rpms/python-pyqtchart/pull-request/7

The Fedora CI - scratch build is marked as error.

From the log it seems that mock -r fedora-35-x86_64 --resultdir=./ --buildsrpm --spec <pkgname>.spec --source . fails with:

ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M eaaec65ab1724d00b1fe140d55fddfee -D /var/lib/mock/fedora-rawhide-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.s5i024q8:/etc/resolv.conf --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-pyqtchart.spec

No idea why exactly.


Same here (a recently created new package):

https://src.fedoraproject.org/rpms/chessx/pull-request/2

@msrb ptal, seems something regressed (mock, systemd?)

interestingly, just some components are affected:
https://osci-jenkins-1.ci.fedoraproject.org/job/fedora-ci/job/dist-git-build-pipeline/job/master/buildTimeTrend

So it might be something else ...

Metadata Update from @mvadkert:
- Issue priority set to: High (was: Medium)

From the log it seems that this is mock-2.9-1.el8, hence RHEL 8.

Is it possible that systemd-nspawn also suffers from the clone3 incompatibility?

cc @fweimer @msuchy @praiskup @zbyszek

In my experience, mock from EPEL8 has required the simple isolation mode for quite some time. clone3 is just one more issue.

I believe systemd-nspawn still doesn't allow disabling seccomp filters, so I haven't looked at this further. It would certainly be nice to have something with PID and network isolation for mock, but the seccomp filters do more harm than good.

I can verify that on RHEL 8, when I run mock -r fedora-35-x86_64 --init with the default configuration, I get:

...
Finish(bootstrap): dnf install
Start(bootstrap): creating root cache
Finish(bootstrap): creating root cache
Finish(bootstrap): chroot init
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 2.11
INFO: Mock Version: 2.11
Start: dnf install
No matches found for the following disable plugin patterns: local, spacewalk
fedora                                                                                                                                                                                           0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M b56fca31da5e4c02abb5a0ce48950324 -D /var/lib/mock/fedora-rawhide-x86_64-bootstrap/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.in5v51fw:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/fedora-rawhide-x86_64/root/installation-homedir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --setenv=LC_MESSAGES=C.UTF-8 --resolv-conf=off /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 35 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk install @buildsys-build --setopt=tsflags=nocontexts
No matches found for the following disable plugin patterns: local, spacewalk
fedora                                                                                                                                                                                           0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]

That is mock-2.11-1.el8.noarch, which is even newer.

The relevant problem is getaddrinfo() thread failed to start.

And yes, mock -r fedora-35-x86_64 --isolation=simple works.

According to the logs systemd-nspawn is the culprit. Mock is not guilty (directly). I will leave it to @zbyszek.

I tried to update the machine earlier today just to see whether newer mock helps.

I will try with --isolation=simple as suggested by @fweimer and @churchyard.

--isolation=simple did the trick.

Thanks @churchyard and @fweimer :wink:

Metadata Update from @msrb:
- Issue status updated to: Closed (was: Open)

Thanks!

Still doesn't work for me in some packages, but the error is different, so I've opened another issue:

https://pagure.io/fedora-ci/general/issue/265

Still doesn't work for me in some packages, but the error is different...

That was an error on my part, not relevant to this issue.

Metadata