Bug 1804415

Summary: 'mock -r fedora-rawhide-i386 shell' fails
Product: [Fedora] Fedora Reporter: Jaroslav Škarvada <jskarvad>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: jdisnard, jkeating, mebrown, msuchy, philip.wyett, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-29 22:45:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jaroslav Škarvada 2020-02-18 18:58:21 UTC
Description of problem:
On x86_64 machine, I am unable to initialize rawhide-i386 chroot.

Version-Release number of selected component (if applicable):
mock-2.0-2.fc30.noarch

How reproducible:
Always

Steps to Reproduce:
1. mock -r fedora-rawhide-i386 shell
2.
3.

Actual results:
...
Complete!
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
Start: dnf install
No matches found for the following disable plugin patterns: local, spacewalk
local                                                                                                                                                         7.7 MB/s |  53 MB     00:06    
Last metadata expiration check: 0:00:43 ago on Út 18. února 2020, 19:43:17.
[Errno 1] Operation not permitted
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M ec03051fcfff44a890d46d5ec2c3cfc3 -D /var/lib/mock/fedora-rawhide-i386-bootstrap/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.yx61ne6h:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/fedora-rawhide-i386/rpmconfig --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=cs_CZ.utf8 --setenv=LC_MESSAGES=C.UTF-8 /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-i386/root/ --releasever 32 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk install @build --setopt=tsflags=nocontexts
No matches found for the following disable plugin patterns: local, spacewalk
local                                                                                                                                                         7.7 MB/s |  53 MB     00:06    
Last metadata expiration check: 0:00:43 ago on Út 18. února 2020, 19:43:17.
[Errno 1] Operation not permitted

Expected results:
No error, shell

Additional info:
x86_64 chroot initializes OK
'--scrub=all' didn't help
Also the target fedora-33-i386 and 32 doesn't work, the 31 works.
I guess the mock config is wrong, e.g. the releasever should probably be 33 not 32 for fedora-33-i386.

Comment 1 Jaroslav Škarvada 2020-02-18 19:05:32 UTC
With the --old-chroot it works, I will try to update kernel and reboot.

Comment 2 Jaroslav Škarvada 2020-02-18 19:23:26 UTC
Interesting that once successfully provisioned with the --old-chroot, I can enter the shell even without the --old-chroot.

Comment 3 Pavel Raiskup 2020-02-19 14:46:35 UTC
Don't you have some changes in rpm -V mock mock-core-configs?  On my
F31 box this seems to work fine:
$ mock -r fedora-rawhide-i386 --scrub=all
$ mock -r fedora-rawhide-i386 shell
...
<mock-chroot> sh-5.0#

Comment 4 Pavel Raiskup 2020-02-19 14:49:17 UTC
This seems to be duplicate of 1774499.  Can you check you have no changes
in mock-core-configs package?  On my F31 this just works.

Comment 5 Jaroslav Škarvada 2020-02-19 15:22:03 UTC
$ rpm -qV mock-core-configs
SM5...GT.  c /etc/mock/rhel-7-x86_64.cfg
SM5...GT.  c /etc/mock/rhel-8-x86_64.cfg

I also tried with the changes mentioned in comment 0, because I think the current mock config is wrong (if compared to the x86_64 version), i.e.:

--- fedora-rawhide-i386.cfg	2020-02-08 14:15:02.000000000 +0100
+++ fedora-rawhide-i386.cfg.new	2020-02-18 19:58:53.114273551 +0100
@@ -6,7 +6,7 @@
 config_opts['chroot_setup_cmd'] = 'install @build'
 config_opts['dist'] = 'rawhide'  # only useful for --resultdir variable subst
 config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
-config_opts['releasever'] = '32'
+config_opts['releasever'] = '33'
 
 config_opts['package_manager'] = 'dnf'
 
@@ -25,7 +25,7 @@
 install_weak_deps=0
 metadata_expire=0
 best=1
-module_platform_id=platform:f32
+module_platform_id=platform:f33
 protected_packages=
 
 # repos

But it seems unrelated to my problem and in both cases I got the same error. Maybe it's duplicate of bug 1774499, the error message seems the same. Maybe the difference is the fedora 30 on my side? Or maybe some different version of some package in the chroot?

Also why the template is not used for the i386?

Comment 6 Pavel Raiskup 2020-02-19 17:13:53 UTC
(In reply to Jaroslav Škarvada from comment #5)
> I also tried with the changes mentioned in comment 0, because I think the
> current mock config is wrong (if compared to the x86_64 version), i.e.:
> 
>  config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
> -config_opts['releasever'] = '32'
> +config_opts['releasever'] = '33'
>  ....
> -module_platform_id=platform:f32
> +module_platform_id=platform:f33
>  protected_packages=

Yeah, this is WIP here:
https://github.com/rpm-software-management/mock/pull/478

All Mageia and OpenSUSE configs are broken, so I'll wrap new release ASAP.

> But it seems unrelated to my problem and in both cases I got the same error.
> Maybe it's duplicate of bug 1774499, the error message seems the same. Maybe
> the difference is the fedora 30 on my side? Or maybe some different version
> of some package in the chroot?
> 
> Also why the template is not used for the i386?

Because there is only [local] repo and it was probably considered too
different from others ... but it should be eventually templatized.

Comment 7 Fedora Update System 2020-02-20 09:29:43 UTC
FEDORA-2020-376c58ea30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-376c58ea30

Comment 8 Fedora Update System 2020-02-21 01:10:20 UTC
mock-core-configs-32.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-376c58ea30

Comment 9 Fedora Update System 2020-02-21 01:32:50 UTC
mock-core-configs-32.2-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bfec22a764

Comment 10 Fedora Update System 2020-02-21 19:47:51 UTC
FEDORA-2020-bfec22a764 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-bfec22a764

Comment 11 Fedora Update System 2020-02-22 01:53:21 UTC
mock-core-configs-32.3-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bfec22a764

Comment 12 Fedora Update System 2020-02-22 02:25:20 UTC
mock-core-configs-32.3-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-376c58ea30

Comment 13 Fedora Update System 2020-02-29 22:45:56 UTC
mock-core-configs-32.3-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2020-03-04 16:57:01 UTC
mock-core-configs-32.3-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.