Skip to content
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

Cannot remove toolbox #345

Closed
yajo opened this issue Dec 9, 2019 · 4 comments
Closed

Cannot remove toolbox #345

yajo opened this issue Dec 9, 2019 · 4 comments

Comments

@yajo
Copy link

yajo commented Dec 9, 2019

See this log:

yajo@yajolap ~> toolbox -v create -c test
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user yajo
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
toolbox: current Podman version is 1.6.2
toolbox: migration not needed: Podman version 1.6.2 is unchanged
toolbox: Fedora generational core is f31
toolbox: base image is fedora-toolbox:31
toolbox: container is test
toolbox: checking value /run/.heim_org.h5l.kcm-socket (Stream) of property Listen in sssd-kcm.socket
toolbox: parsing value /run/.heim_org.h5l.kcm-socket (Stream) of property Listen in sssd-kcm.socket
toolbox: checking if 'podman create' supports --ulimit host
<standard input>:693: warning [p 12, 5.0i]: cannot adjust line
<standard input>:694: warning [p 12, 5.2i]: cannot adjust line
toolbox: 'podman create' supports --ulimit host
toolbox: looking for image localhost/fedora-toolbox:31
toolbox: looking for image registry.fedoraproject.org/f31/fedora-toolbox:31
toolbox: base image fedora-toolbox:31 resolved to registry.fedoraproject.org/f31/fedora-toolbox:31
toolbox: checking if container test already exists
toolbox: checking if /usr is mounted read-only or read-write
toolbox: mount-point of /usr is /usr
toolbox: mount flags of /usr on the host are ro,relatime,seclabel
toolbox: /var/home/yajo canonicalized to /var/home/yajo
toolbox: checking if /home is a symbolic link to /var/home
toolbox: /home is a symbolic link to /var/home
toolbox: calling org.freedesktop.Flatpak.SessionHelper.RequestSession
toolbox: creating container test
Created container: test
Enter with: toolbox enter --container test
yajo@yajolap ~> toolbox -v enter -c test
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user yajo
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
toolbox: current Podman version is 1.6.2
toolbox: migration not needed: Podman version 1.6.2 is unchanged
toolbox: Fedora generational core is f31
toolbox: base image is fedora-toolbox:31
toolbox: container is test
toolbox: checking if container test exists
toolbox: calling org.freedesktop.Flatpak.SessionHelper.RequestSession
toolbox: starting container test
toolbox: /etc/profile.d/toolbox.sh already mounted in container test
toolbox: inspecting entry point of container test
toolbox: entry point of container test is toolbox
toolbox: waiting for container test to finish initializing
toolbox: creating list of environment variables to forward
toolbox: COLORTERM=truecolor
toolbox: COLUMNS is unset
toolbox: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
toolbox: DBUS_SYSTEM_BUS_ADDRESS is unset
toolbox: DESKTOP_SESSION=gnome
toolbox: DISPLAY=:1
toolbox: LANG=es_ES.UTF-8
toolbox: LINES is unset
toolbox: SHELL=/usr/bin/fish
toolbox: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
toolbox: TERM=xterm-256color
toolbox: TOOLBOX_PATH is unset
toolbox: VTE_VERSION=5803
toolbox: WAYLAND_DISPLAY is unset
toolbox: XDG_CURRENT_DESKTOP=GNOME
toolbox: XDG_DATA_DIRS=/var/home/yajo/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
toolbox: XDG_MENU_PREFIX=gnome-
toolbox: XDG_RUNTIME_DIR=/run/user/1000
toolbox: XDG_SEAT is unset
toolbox: XDG_SESSION_DESKTOP=gnome
toolbox: XDG_SESSION_ID is unset
toolbox: XDG_SESSION_TYPE=x11
toolbox: XDG_VTNR is unset
toolbox: created options for environment variables to forward
--env=COLORTERM=truecolor --env=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus --env=DESKTOP_SESSION=gnome --env=DISPLAY=:1 --env=LANG=es_ES.UTF-8 --env=SHELL=/usr/bin/fish --env=SSH_AUTH_SOCK=/run/user/1000/keyring/ssh --env=TERM=xterm-256color --env=VTE_VERSION=5803 --env=XDG_CURRENT_DESKTOP=GNOME --env=XDG_DATA_DIRS=/var/home/yajo/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/ --env=XDG_MENU_PREFIX=gnome- --env=XDG_RUNTIME_DIR=/run/user/1000 --env=XDG_SESSION_DESKTOP=gnome --env=XDG_SESSION_TYPE=x11 --env=COLUMNS=80 --env=LINES=24
toolbox: looking for /usr/bin/fish in container test
Error: non zero exit code: 1: OCI runtime error
toolbox: /usr/bin/fish not found in test; using /bin/bash instead
toolbox: running in container test:
toolbox: /bin/bash
toolbox: -l
⬢[yajo@toolbox ~]$ logout
yajo@yajolap ~> toolbox -v rm test
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user yajo
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
toolbox: current Podman version is 1.6.2
toolbox: migration not needed: Podman version 1.6.2 is unchanged
Error: cannot remove container 0bee2a5ea59a4077c8b7d9709af12d77627d8939dbf90c820b9eeeca263980b7 as it is running - running or paused containers cannot be removed: container state improper
toolbox: failed to remove container test

I have to stop the container manually with podman to remove it with toolbox:

yajo@yajolap ~> podman container stop test
0bee2a5ea59a4077c8b7d9709af12d77627d8939dbf90c820b9eeeca263980b7
yajo@yajolap ~> toolbox -v rm test
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user yajo
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
toolbox: current Podman version is 1.6.2
toolbox: migration not needed: Podman version 1.6.2 is unchanged
@kronenpj
Copy link

kronenpj commented Dec 10, 2019

Try toolbox -v rm -f test or toolbox -v rm --force test. There's already a request / question regarding toolbox not stopping containers.

@HarryMichal
Copy link
Member

The behavior that Toolbox doesn't stop containers is intended because stopping container right after leaving is not the most optimal way of handling this. The "official" way of removing running containers is as @kronenpj suggested the use of --force option.

But I agree that this is also not the most optimal behavior.

@yajo
Copy link
Author

yajo commented Dec 11, 2019

At least the error log could be more helpful then...

@HarryMichal
Copy link
Member

I definitely agree with that. I have a little change in mind. I'll try to look at it soon.

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

No branches or pull requests

3 participants