Bug 2026571

Summary: Unable to build the root for centos-stream-8-x86_64
Product: [Fedora] Fedora EPEL Reporter: Frank Büttner <bugzilla>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: copr-team, dave.love, david.ward, jkeating, mebrown, msuchy, philip.wyett, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-2.16-1.fc35 mock-2.16-1.fc34 mock-2.16-1.el7 mock-2.16-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-12 01:18:02 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 Frank Büttner 2021-11-25 07:16:48 UTC
Description of problem:
Using it under CentOS7 it will fail. Doing the same on Fedora 33 will work.

Version-Release number of selected component (if applicable):
mock-2.14-1.el7.noarch

How reproducible:
Every time

Steps to Reproduce:
1. call "mock -r centos-stream-8-x86_64 --init"

Actual results:
INFO: mock.py version 2.14 starting (python version = 3.6.8, NVR = mock-2.14-1.el7)...
INFO: Using 'yum' instead of 'dnf' for bootstrap chroot
Start(bootstrap): init plugins
INFO: tmpfs initialized
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: tmpfs initialized
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start: clean chroot
Finish: clean chroot
Start(bootstrap): chroot init
INFO: mounting tmpfs at /var/lib/mock/centos-stream-8-x86_64-bootstrap/root.
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: enabled HW Info plugin
Mock Version: 2.14
INFO: Mock Version: 2.14
Start(bootstrap): yum install
INFO: unmounting tmpfs.
ERROR: Command failed: 
 # /usr/bin/yum --installroot /var/lib/mock/centos-stream-8-x86_64-bootstrap/root/ --releasever 8 install dnf dnf-plugins-core --setopt=tsflags=nocontexts
Failed to set locale, defaulting to C


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
       or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: appstream/x86_64


Expected results:
That it will work like on Fedora 33


Additional info:

Comment 1 Miroslav Suchý 2021-11-25 08:42:31 UTC
I can reproduce.

Comment 2 Miroslav Suchý 2021-11-25 09:01:10 UTC
Hmm, 
when I replace
  mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
in config with
  mirrorlist=http://mirrorlist.centos.org/?release=8&arch=$basearch&repo=BaseOS&infra=$infra

i.e. expand the $stream variable, it starts working.

Comment 3 Miroslav Suchý 2021-11-25 09:16:41 UTC
Centos Stream 9 does not have this problem as it does not use $stream

When I replace $stream with $releasever, it will work. Will do a PR.

Comment 4 Miroslav Suchý 2021-11-25 09:20:28 UTC
The culprit is in

config_opts['dnf_vars'] = { 'stream': '8-stream',                                                                                                                                            
                            'contentdir': 'centos',
                          }

This creates dnf variables, but not yum variables.

Comment 5 Pavel Raiskup 2021-11-25 09:23:28 UTC
> /usr/bin/yum --installroot /var/lib/mock/centos-stream-8-x86_64-bootstrap/root/ --releasever 8 install dnf dnf-plugins-core --setopt=tsflags=nocontexts

Why /usr/bin/yum?

Comment 6 Pavel Raiskup 2021-11-25 09:56:06 UTC
Ah, we are on EL7.

Comment 8 Fedora Update System 2021-12-16 18:12:43 UTC
FEDORA-EPEL-2021-82ccb8f2b7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-82ccb8f2b7

Comment 9 Fedora Update System 2021-12-16 18:12:44 UTC
FEDORA-2021-0947974f0a has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0947974f0a

Comment 10 Fedora Update System 2021-12-16 18:12:45 UTC
FEDORA-2021-a7d4aaa6fe has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a7d4aaa6fe

Comment 11 Fedora Update System 2021-12-17 01:27:27 UTC
FEDORA-2021-0947974f0a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0947974f0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0947974f0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-12-17 01:34:04 UTC
FEDORA-EPEL-2021-2d0f959e00 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-2d0f959e00

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-12-17 01:43:22 UTC
FEDORA-EPEL-2021-82ccb8f2b7 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-82ccb8f2b7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2021-12-17 01:57:47 UTC
FEDORA-2021-a7d4aaa6fe has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a7d4aaa6fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a7d4aaa6fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 David Ward 2022-01-02 01:57:30 UTC
(In reply to Miroslav Suchý from comment #7)
> https://github.com/rpm-software-management/mock/pull/809

This doesn't fix the real issue; mock should be configuring extended variables for yum just like it does for dnf. It is actually straightforward:

https://github.com/rpm-software-management/mock/pull/847

Comment 16 Pavel Raiskup 2022-01-03 08:01:58 UTC
Thanks for the update, but the request for using YUM variables is an orthogonal thing.

This bug is about real life build failures, and the updated mock + mock-core-configs (currently
stuck in Bodhi) fixes this.

Comment 17 Pavel Raiskup 2022-01-04 16:22:57 UTC
*** Bug 2035507 has been marked as a duplicate of this bug. ***

Comment 18 Frank Büttner 2022-01-18 06:36:21 UTC
For me mock-2.16-1.el7 and mock-core-configs-36.4-1.el7 , will work again on CentOS7.

Comment 19 Fedora Update System 2022-02-03 00:20:43 UTC
FEDORA-EPEL-2021-82ccb8f2b7 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-82ccb8f2b7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2022-02-03 00:21:11 UTC
FEDORA-EPEL-2021-2d0f959e00 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-2d0f959e00

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2022-02-03 01:19:14 UTC
FEDORA-2021-0947974f0a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0947974f0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0947974f0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2022-02-03 01:34:13 UTC
FEDORA-2021-a7d4aaa6fe has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a7d4aaa6fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a7d4aaa6fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2022-02-05 00:23:44 UTC
FEDORA-EPEL-2021-82ccb8f2b7 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-82ccb8f2b7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2022-02-05 00:33:28 UTC
FEDORA-EPEL-2021-2d0f959e00 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-2d0f959e00

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2022-02-05 01:31:14 UTC
FEDORA-2021-0947974f0a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0947974f0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0947974f0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 26 Fedora Update System 2022-02-05 02:11:34 UTC
FEDORA-2021-a7d4aaa6fe has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a7d4aaa6fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a7d4aaa6fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 27 Fedora Update System 2022-02-12 01:18:02 UTC
FEDORA-2021-a7d4aaa6fe has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 28 Fedora Update System 2022-02-15 01:16:42 UTC
FEDORA-2021-0947974f0a has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 29 Fedora Update System 2022-02-15 01:51:22 UTC
FEDORA-EPEL-2021-82ccb8f2b7 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 30 Fedora Update System 2022-02-15 02:12:43 UTC
FEDORA-EPEL-2021-2d0f959e00 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.