Bug 1868223

Summary: The toolbox container name is changed from 'toolbox-root' to 'toolbox-' in a chroot environment
Product: Red Hat Enterprise Linux 8 Reporter: Alex Jia <ajia>
Component: toolboxAssignee: Jindrich Novy <jnovy>
Status: CLOSED WONTFIX QA Contact: Alex Jia <ajia>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: jnovy, miabbott, mnguyen, travier, ypu
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: toolbox-0.0.99-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-09 07:46: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 Alex Jia 2020-08-12 03:44:00 UTC
Description of problem:
The toolbox container name is changed from toolbox-root to toolbox- in a chroot environment, the name 'toolbox-' is not very friendly for users.

In addition, an error is raised like this "Error: docker.io/fedora:latest does not have a label of RUN".

For details, please also see https://bugzilla.redhat.com/show_bug.cgi?id=1850230#c21

Version-Release number of selected component (if applicable):
toolbox-0.0.8-1.module+el8.3.0+7627+c01ededd.noarch

How reproducible:
always

Steps to Reproduce:
1. oc debug node/<node_name>
2. chroot /host
3. cat << EOF > ~/.toolboxrc
IMAGE=fedora:latest
REGISTRY=docker.io
EOF
4. toolbox

Actual results:
sh-4.4# toolbox
.toolboxrc file detected, overriding defaults...
Error: docker.io/fedora:latest does not have a label of RUN
Spawning a container 'toolbox-' with image 'docker.io/fedora:latest'
[root@toolbox /]# ls
bin  boot  dev  etc  home  host  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

Expected results:
fix container naming and error message.

Additional info:

Comment 5 Alex Jia 2021-01-19 05:41:57 UTC
Please also see https://bugzilla.redhat.com/show_bug.cgi?id=1917663

Comment 6 Timothée Ravier 2021-01-22 17:19:56 UTC
https://github.com/coreos/toolbox/pull/67 should fix that one too.

Comment 9 Timothée Ravier 2021-01-25 11:01:50 UTC
Sorry for the noise here. This fix is not for the same toolbox (coreos/toolbox).