Skip to content

pkg/utils: add ELN as supported distro - #1814

Open
yselkowitz wants to merge 1 commit into
containers:mainfrom
yselkowitz:eln
Open

pkg/utils: add ELN as supported distro#1814
yselkowitz wants to merge 1 commit into
containers:mainfrom
yselkowitz:eln

Conversation

@yselkowitz

Copy link
Copy Markdown

No description provided.

@yselkowitz
yselkowitz requested a review from debarshiray as a code owner July 2, 2026 23:43
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for Fedora ELN to Toolbx by introducing ELN-specific utility functions, registering the "eln" distribution, and updating the documentation and tests. The reviewer noted that the host detection logic in getHostID() must be updated to check for VARIANT_ID == "eln" when ID == "fedora" to ensure Fedora ELN hosts are correctly identified and default to ELN containers instead of standard Fedora containers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/pkg/utils/utils.go
@yselkowitz

Copy link
Copy Markdown
Author

ping @debarshiray

@debarshiray debarshiray left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea!

If Fedora ELN has ID=eln in os-release(5), then it seems natural to add it as a separate distro. Although, I hope we don't run into any namespace problems with other downstream distributors by not having a fedora prefix.

However, does this really work? From reading the changes, it seems that it uses the quay.io/fedora/eln:latest image. If I got that right, then:

$ toolbox create --image quay.io/fedora/eln:latest
Created container: eln-latest
Enter with: toolbox enter eln-latest
$ toolbox enter eln-latest 
Error: failed to modify user rishi with UID 1000: usermod(1) not found

Poking at the image with podman run confirms the problem:

$ podman run --interactive --rm --tty quay.io/fedora/eln:latest /bin/bash
[root@bb0c5c79fdcc /]# useradd
bash: useradd: command not found
[root@bb0c5c79fdcc /]# usermod
bash: usermod: command not found
[root@bb0c5c79fdcc /]# passwd
bash: passwd: command not found

In terms of having a similar user experience as the default host shell on Fedora or Red Hat Enterprise Linux Workstation, I see:

$ podman run --interactive --rm --tty quay.io/fedora/eln:latest /bin/bash
[root@e8a5adf33a34 /]# 
[root@e8a5adf33a34 /]# which
bash: which: command not found
[root@e8a5adf33a34 /]# man
bash: man: command not found

Here is a complete list of image requirements for Toolbx with some context and explanation.

I wonder if it will be possible to add an eln-toolbox image, just like we have the fedora-toolbox and the UBI-based toolbox images. The reason for the separate Toolbx images is to reliably deal with problems like these without getting into a tug-of-war with the default base images for the distribution, which have different goals.

In this particular case, just like ELN is (Red Hat) Enterprise Linux Next, the eln-toolbox image can help with the onboarding of the toolbox image for the upcoming RHEL.

@debarshiray

Copy link
Copy Markdown
Member

Build failed. https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/ec85aa64270a4c6faf391eeb10b3ab4c

unit-test RETRY_LIMIT in 29s

[...]

unit-test-restricted RETRY_LIMIT in 28s
system-test-fedora-rawhide-commands-options RETRY_LIMIT in 30s
system-test-fedora-rawhide-runtime-environment-arch-fedora RETRY_LIMIT in 27s
system-test-fedora-rawhide-runtime-environment-ubuntu RETRY_LIMIT in 33s

These CI failures should be solved by rebasing against main, specifically commit 93f882c04cbc5a81.

@yselkowitz

Copy link
Copy Markdown
Author

We already have a toolbox image, quay.io/fedora/eln-toolbox, and this code uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants