Bug 1867426
| Summary: | buildah subscription-manager interferring | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | mckweb |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | CLOSED NOTABUG | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.2 | CC: | dornelas, dwalsh, hasuzuki, redakkan, tsweeney |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-02 21:56:13 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
mckweb
2020-08-10 00:43:32 UTC
Hi , Thank you for opening the bug . Can you please refer this link to do the setup and let us if it is working. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index thanks, Rehana *** Bug 1870376 has been marked as a duplicate of this bug. *** Rehana, I opened https://bugzilla.redhat.com/show_bug.cgi?id=1870376 last night, not realizing this one had already been started. I've just closed that. In that BZ: "Additional info: See Buildah issue with full information: https://github.com/containers/buildah/issues/1973. If the commands above are run on any other Linux distribution it works. If the target container was a RHEL based container, then I could accept the error, but it should not be erroring for other distributions such as Fedora, Alpine, Busybox, etc." As noted, the container setup was correct. The problem is trying to do `dnf install --installroot` into a container. I could see a failure into a RHEL container, but I'm not sure about that, but it should NOT fail for any other Linux distribution. Hi , Thanks for details . Can you please try disabling subscription-manager plugins ( /etc/dnf/plugins/subscription-manager.conf and /etc/dnf/plugins/product-id.conf ) before trying the installation of non RHEL contents. thanks, Rehana Rehana, Just to make sure I disable it appropriately, can you supply me with the commands to do the disabling please? (In reply to Tom Sweeney from comment #6) > Rehana, > > Just to make sure I disable it appropriately, can you supply me with the > commands to do the disabling please? Sure , Please open the files /etc/dnf/plugins/subscription-manager.conf and /etc/dnf/plugins/product-id.conf and set "enabled" to 0. Also run `subscription-manager config --rhsm.auto_enable_yum_plugin=0`. hope this helps . thanks, Rehana Rehana, The build fails after disabling, but this time with a different errror: # subscription-manager config --rhsm.auto_enable_yum_plugin=0 # newcontainer=$(buildah from scratch) # scratchmnt=$(buildah mount $newcontainer) # dnf install --installroot $scratchmnt --releasever 30 bash coreutils --setopt install_weak_deps=false -y Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 373 B/s | 259 B 00:00 Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms' Error: Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms' (In reply to Tom Sweeney from comment #8) > Rehana, > > The build fails after disabling, but this time with a different errror: > > # subscription-manager config --rhsm.auto_enable_yum_plugin=0 > # newcontainer=$(buildah from scratch) > # scratchmnt=$(buildah mount $newcontainer) > # dnf install --installroot $scratchmnt --releasever 30 bash coreutils > --setopt install_weak_deps=false -y > Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) > 373 B/s | 259 B 00:00 > Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms' > Error: Failed to download metadata for repo > 'rhel-8-for-x86_64-appstream-rpms' Hi Tom, Thanks for the details , we would like to understand the scenario better.Hence, I have setup a meeting on Monday( Aug 31) with Chris Snyder from our team to help clarify the issue. thanks, Rehana Hi Rehana, Due to our differing timezones, the meeting you setup was for Sunday afternoon my time and I've other plans. I'm on the East coast in the USA FWIW. I've sent further details on suggested times in a private email and I'd like to get Dan Walsh into the meeting too if possible. (In reply to Tom Sweeney from comment #10) > Hi Rehana, > > Due to our differing timezones, the meeting you setup was for Sunday > afternoon my time and I've other plans. I'm on the East coast in the USA > FWIW. I've sent further details on suggested times in a private email and > I'd like to get Dan Walsh into the meeting too if possible. Hi Tom, Sorry my bad , did not do the conversion well. Sure I will include Dan Walsh and set up a meeting in the requested time to discuss further . thanks, REhana I had a chat with Tom, as I think there's just some confusion about the root cause of this issue. I believe the original issue as reported is expected behavior. It's not explicitly called out, but the upstream "Building a container from scratch" directions[1] are designed around using buildah on Fedora. They expect that the host is some recent release of Fedora and that Fedora's dnf is being used. I think the question that needs to be asked is what is the end goal here? Is the goal to build a RHEL container image from scratch or to build a Fedora 30 container image from scratch? As Rehana pointed out, building a RHEL container image from scratch is documented at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index#creating_images_from_scratch_with_buildah This process works, but it requires that the '--releasever 30' option not be set, as a value of '30' is not valid for RHEL. The default value of '8' will be used, unless otherwise specified. Building a Fedora container from scratch on RHEL would be a bit more tricky and would not be supported. You would need to manually define all of the relevant Fedora repos (fedora, fedora-updates, etc.) on the RHEL system, then DNF would be able to access them. [1] https://github.com/containers/buildah/blob/master/docs/tutorials/01-intro.md#building-a-container-from-scratch As Derrick noted, the issue is that dnf doesn't know what to install as you used a version (30) that RHEL's dnf is not aware of for itself. If you pick a RHEL version for the --releaserver option it should work. Or if you specify fedora instead of scratch in your first "from" command it works too: ``` # newcontainer=$(buildah from fedora) Getting image source signatures Copying blob c7def56d621e done Copying config a368cbcfa6 done Writing manifest to image destination Storing signatures # scratchmnt=$(buildah mount $newcontainer) # dnf install --installroot $scratchmnt --releasever 30 bash coreutils --setopt install_weak_deps=false -y Fedora 30 openh264 (From Cisco) - x86_64 10 kB/s | 5.1 kB 00:00 Fedora Modular 30 - x86_64 2.2 MB/s | 1.9 MB 00:00 Fedora Modular 30 - x86_64 - Updates 836 kB/s | 3.6 MB 00:04 Fedora 30 - x86_64 - Updates 9.5 MB/s | 29 MB 00:03 Fedora 30 - x86_64 9.6 MB/s | 61 MB 00:06 Package bash-5.0.17-1.fc32.x86_64 is already installed. Package coreutils-8.32-4.fc32.1.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! ``` Or change your original dnf command to specify a RHEL version: ``` # dnf install --installroot $scratchmnt --releasever 8.1 bash coreutils --setopt install_weak_deps=false -y ``` using a RHEL version and this will work too. I've created https://github.com/containers/buildah/pull/2583 to clarify the dnf requirement within the tutorial. As a follow up, the PR https://github.com/containers/buildah/pull/2583 to update the tutorial has been merged. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |