Bug 1717379

Summary: Cannot enter toolbox
Product: [Fedora] Fedora Reporter: Mirek Svoboda <goodmirek>
Component: toolboxAssignee: Debarshi Ray <debarshir>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: bbaude, cosimo.cecchi, debarshir, dwalsh, fede, frantisek.kluknavsky, goodmirek, henrique.ferreiro, jnovy, lsm5, mheon, sgraf, timothee.floure, tim.thawkins
Target Milestone: ---Keywords: Reopened
Target Release: ---   
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: 2019-09-21 12:02:35 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 Mirek Svoboda 2019-06-05 11:30:22 UTC
Description of problem:
Cannot enter toolbox.
```
$ toolbox create
Image required to create toolbox container.
Download registry.fedoraproject.org/f30/fedora-toolbox:30 (500MB)? [y/N]: y
Created container: fedora-toolbox-30
Enter with: toolbox enter

$ toolbox enter
toolbox: unable to copy /etc/profile.d/toolbox.sh to container fedora-toolbox-30
```
Switching off selinux does not help. Same behavior observed in both FC30 Workstation (dnf based) and FC30 Silverblue Workstation (rpm-ostree based).


Version-Release number of selected component (if applicable):
$ uname -a
Linux ip-10-0-2-15.eu-west-1.compute.internal 5.1.6-300.fc30.x86_64 #1 SMP Fri May 31 17:43:23 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -q podman
podman-1.3.1-1.git7210727.fc30.x86_64
$ rpm -q toolbox
toolbox-0.0.10-1.fc30.noarch


How reproducible:
Create and try to enter toolbox.


Steps to Reproduce:
1. toolbox create
2. toolbox enter


Actual results:
Error message toolbox: unable to copy /etc/profile.d/toolbox.sh to container fedora-toolbox-30


Expected results:
Toolbox container shell prompt.


Additional info:

Comment 1 Timothée Floure 2019-06-06 09:44:56 UTC
Seems related to: https://github.com/containers/libpod/issues/3219

Comment 2 Debarshi Ray 2019-06-06 10:21:27 UTC
Yes, it's a regression in podman-1.3.1. Reassigning.

Comment 3 Mirek Svoboda 2019-06-11 20:45:33 UTC
The issue is still present with updated podman-1.4.0.

$ uname -a
Linux ip-192-168-100-18.eu-west-1.compute.internal 5.1.8-300.fc30.x86_64 #1 SMP Sun Jun 9 17:09:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -q podman
podman-1.4.0-1.fc30.x86_64
$ rpm -q toolbox
toolbox-0.0.10-1.fc30.noarch

Issue https://github.com/containers/libpod/issues/3219 does not happen any longer with the updated podman-1.4.0.

Comment 4 Mirek Svoboda 2019-06-12 13:01:45 UTC
Not sure what happened, but it works now with the same packages. Maybe due to reboot or any other update. Closing the bug.

Comment 5 Tim Hawkins 2019-06-13 03:58:56 UTC
i have the same problem with this, and updating to 1.4.0 has NOT fixed this. 

[tim.hawkins@localhost ~]$ toolbox -v create
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: checking if 'podman system migrate' exists
toolbox: migration not needed: 1.4.0 is unchanged
toolbox: Fedora generational core is f30
toolbox: base image is fedora-toolbox:30
toolbox: container is fedora-toolbox-30
toolbox: checking value /var/run/.heim_org.h5l.kcm-socket (Stream) of property Listen in sssd-kcm.socket
toolbox: parsing value /var/run/.heim_org.h5l.kcm-socket (Stream) of property Listen in sssd-kcm.socket
toolbox: checking if 'podman create' supports --dns=none and --no-hosts
toolbox: 'podman create' supports --dns=none and --no-hosts
toolbox: looking for image localhost/fedora-toolbox:30
toolbox: looking for image registry.fedoraproject.org/f30/fedora-toolbox:30
Image required to create toolbox container.
Download registry.fedoraproject.org/f30/fedora-toolbox:30 (500MB)? [y/N]: y
toolbox: pulling image registry.fedoraproject.org/f30/fedora-toolbox:30
Trying to pull registry.fedoraproject.org/f30/fedora-toolbox:30...Getting image source signatures
Copying blob 4c4fc0337a75 done
Copying blob eb96ef222807 done
Copying config 42cdab313e done
Writing manifest to image destination
Storing signatures
toolbox: base image fedora-toolbox:30 resolved to registry.fedoraproject.org/f30/fedora-toolbox:30
toolbox: checking if container fedora-toolbox-30 already exists
toolbox: trying to create container fedora-toolbox-30
Created container: fedora-toolbox-30
Enter with: toolbox enter
[tim.hawkins@localhost ~]$ toolbox list -c
Containers created by toolbox
CONTAINER ID  CONTAINER NAME     CREATED        STATUS   IMAGE NAME
f1060f9bfb38  fedora-toolbox-30  5 seconds ago  Created  registry.fedoraproject.org/f30/fedora-toolbox:30
[tim.hawkins@localhost ~]$ toolbox enter
toolbox: unable to copy /etc/profile.d/toolbox.sh to container fedora-toolbox-30
[tim.hawkins@localhost ~]$ 
[tim.hawkins@localhost ~]$ rpm -q toolbox
toolbox-0.0.10-1.fc30.noarch
[tim.hawkins@localhost ~]$ rpm -q podman
podman-1.4.0-2.fc30.x86_64
[tim.hawkins@localhost ~]$ rpm -q buildah
buildah-1.8.2-1.gite23314b.fc30.x86_64
[tim.hawkins@localhost ~]$

Comment 6 Matthew Heon 2019-06-13 13:17:22 UTC
Reassigning back to Toolbox as I don't see an obvious Podman error here.

Comment 7 Cosimo Cecchi 2019-06-15 20:49:04 UTC
I can also reproduce this issue on Fedora 30 Silverblue with the version of the packages mentioned in comment #5.

Comment 8 Debarshi Ray 2019-06-17 18:28:20 UTC
(In reply to Matthew Heon from comment #6)
> Reassigning back to Toolbox as I don't see an obvious Podman error here.

The "unable to copy ..." error message denotes that 'podman cp ...' is erroring out for one reason or the other. So far, we have identified two reasons for this. Here's a discussion with more details: https://github.com/debarshiray/toolbox/issues/198

Comment 9 Jens Petersen 2019-07-09 07:42:32 UTC
See also https://github.com/debarshiray/toolbox/issues/212

It is best to post full `toolbox -v enter` output.

Comment 10 Federico Bruni 2019-07-10 11:17:14 UTC
The issue seems fixed in both my machines (f30 Silverblue and proper).