-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL7/9 environments not loaded due to ubi8 hard-coding #1065
Comments
One further point - this EL8 hard-coding also impacts RHEL9 as well:
|
I don't see an obvious simple, elegant solution, but it should be possible to add some logic to intercept the RHEL image repo base and rewrite it to the correct major version at this point here: https://github.com/containers/toolbox/blob/main/src/pkg/utils/utils.go#L312 |
I think a better workaround than hacking utils.go would be to just specify the image, not that that fixes the problem...
I can't test this, since it does need the login, but it does try to pull correctly:
You may need to add the |
Sure, I agree, but this image path is not obvious to the end user based on tool feedback, which is all the more complicated by this bug still being present in Fedora at the moment. If it's helpful, a free-as-in-coffee Red Hat Developer Sub should be sufficient for the login credentials to test. |
Sorry about all the confusion here. The story is that the initial attempt to support RHEL Toolbx containers (ie., commit 21d25f8 or #667) using the base UBI image (ie., Back then we already knew that, just like the base That's why, since then, we have put up Toolbx images that are still based on the UBI RPM repositories but are designed for daily interactive use with Toolbx. These are available for both RHELs 8 and 9 at Neither of these images are part of a Toolbx release because they are relatively new. It took some time to work through the process to add some of the necessary packages to the UBI RPM repositories, then eventually the images themselves, and finally making sure that they are sufficiently tested. Although, astute observers will notice that @HarryMichal had added the Toolbx image for RHEL 8 in current Git Anyway, things have fairly settled down by now, so I feel confident about wiring the RHEL 9 image to the |
Note that none of these images should require any form of authentication. The images under You don't even need the gratis RHEL Developer Suite to create the container, but you might need it later to unlock more content afterwards. |
I'm curious when this change was made. It's certainly a welcome one. |
The URLs for the RHEL Toolbx images based on the Red Hat Universal Base Images (or UBI) are a bit more complicated to construct, in comparison to the URLs for Fedora's fedora-toolbox images. It's not enough to just concatenate the registry, the image's basename and the release. Some parts of the URL depend on the release's major number, which requires custom code. So far, the release's major number was hard coded to 8 since only RHEL 8 Toolbx containers were supported. To support other RHEL major releases, it's necessary to have custom code to construct the URLs for the Toolbx images. containers#1065
The URLs for the RHEL Toolbx images based on the Red Hat Universal Base Images (or UBI) are a bit more complicated to construct, in comparison to the URLs for Fedora's fedora-toolbox images. It's not enough to just concatenate the registry, the image's basename and the release. Some parts of the URL depend on the release's major number, which requires custom code. So far, the release's major number was hard coded to 8 since only RHEL 8 Toolbx containers were supported. To support other RHEL major releases, it's necessary to have custom code to construct the URLs for the Toolbx images. containers#1065
It's been like this from the first time I started poking at UBI and the Red Hat OCI registries. The images on Note that the |
I have attempted to add support for RHEL 9 Toolbx containers in #1220 |
Describe the bug
toolbox create --distro rhel --version 7.9
fails to pull the correct image baseSteps how to reproduce the behaviour
toolbox create --distro rhel --version 7.9
Expected behaviour
It should pull from registry.access.redhat.com/ubi7/ubi:7.9
Actual behaviour
It attempts to pull from registry.access.redhat.com/ubi8/ubi:7.9
Screenshots
Output of
toolbox --version
(v0.0.90+)toolbox version 0.0.99.3
Toolbox package info (
rpm -q toolbox
)toolbox-0.0.99.3-4.fc36.x86_64
Output of
podman version
Podman package info (
rpm -q podman
)podman-4.1.0-1.fc36.x86_64
Info about your OS
Fedora Linux 36
Additional context
Documented my steps here on ask.fedoraproject.org, but I was able to get it to work by hacking src/pkg/util.go and overriding the rhel definition to work for 7.x and after compiling, it actually does work, however, this hack alone isn't sufficient since it's now hard-coded for EL7 instead of EL8.
The text was updated successfully, but these errors were encountered: