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

[Error] Cannot enter container with either podman or lilipod on SteamOS 3.4 #1510

Open
Sunspark-007 opened this issue Aug 7, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Sunspark-007
Copy link

Describe the bug
After successfully creating an Ubuntu container using lilipod (failed with podman as per issue #1509), trying to enter the container does not work.

To Reproduce
With Podman:

(deck@steamdeck bin)$ distrobox enter ubuntu-24-04
Error: no such container ubuntu-24-04
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: 
Creating the container ubuntu-24-04
Error: open /etc/containers/policy.json: no such file or directory

With Lilipod:

(deck@steamdeck bin)$ distrobox enter ubuntu-24-04
2024/08/07 14:29:18 no such object: [ubuntu-24-04]
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: 
Creating the container ubuntu-24-04
Distrobox named 'ubuntu-24-04' already exists.
To enter, run:
distrobox enter ubuntu-24-04
 Error: could not start entrypoint.

Expected behavior
For the container to open.

Additional context
Related to bug report #1509

@Sunspark-007 Sunspark-007 added the bug Something isn't working label Aug 7, 2024
@Sunspark-007
Copy link
Author

This may be fixed as I figured out the policy.json file in #1509 but there are issues likely related to #1511 I have not been able to do stuff in the image yet as I think there may be a uid/gid issue.

@Sunspark-007
Copy link
Author

Sunspark-007 commented Aug 9, 2024

I have cleaned the installation and started over with lilipod.. it still doesn't let me enter.. Why? Why does it say no such object and want to start over with some fedora user registry?

(deck@steamdeck ~)$ distrobox-enter ubuntu
2024/08/09 16:49:18 no such object: [ubuntu]
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: n
Ok. For creating it, run this command:
        distrobox create <name-of-container> --image <remote>/<docker>:<tag>
(deck@steamdeck ~)$ distrobox-list
ID           | NAME                 | STATUS             | IMAGE                         
1d41c853af58 | ubuntu               | stopped            | ubuntu:24.04     
(1)(deck@steamdeck ~)$ distrobox-enter ubuntu
2024/08/09 16:55:52 no such object: [ubuntu]
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: 
Creating the container ubuntu
Distrobox named 'ubuntu' already exists.
To enter, run:

distrobox enter ubuntu

 Error: could not start entrypoint.

Verbose log:

(deck@steamdeck ~)$ distrobox enter ubuntu --verbose
+ '[' -z ubuntu ']'
+ '[' '!' -t 0 ']'
+ '[' '!' -t 1 ']'
+ case "${container_manager}" in
+ command -v podman
+ command -v podman-launcher
+ command -v docker
+ command -v lilipod
+ container_manager=lilipod
+ command -v lilipod
+ '[' 1 -ne 0 ']'
+ container_manager='lilipod --log-level debug'
+ '[' 0 -ne 0 ']'
+ container_home=/home/deck
+ container_path=/home/deck/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
+ unshare_groups=0
+ container_status=unknown
++ lilipod --log-level debug inspect --type container --format 'container_status={{.State.Status}};
        unshare_groups={{ index .Config.Labels "distrobox.unshare_groups" }};
        {{range .Config.Env}}{{if slice . 0 5 | eq "HOME="}}container_home={{slice . 5 | printf "%q"}};{{end}}{{end}}
        {{range .Config.Env}}{{if slice . 0 5 | eq "PATH="}}container_path={{slice . 5 | printf "%q"}}{{end}}{{end}}' ubuntu
2024/08/09 16:58:36 no such object: [ubuntu]
+ eval ''
+ '[' 0 -ne 0 ']'
+ '[' unknown = unknown ']'
+ '[' 0 -eq 1 ']'
+ printf 'Create it now, out of image %s? [Y/n]: ' registry.fedoraproject.org/fedora-toolbox:39
Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: + read -r response
Y
+ response=Y
+ case "${response}" in
++ dirname /home/deck/.local/bin/distrobox-enter
+ create_command=/home/deck/.local/bin/distrobox-create
+ '[' 0 -ne 0 ']'
+ create_command='/home/deck/.local/bin/distrobox-create --yes -i registry.fedoraproject.org/fedora-toolbox:39 -n ubuntu'
+ printf 'Creating the container %s\n' ubuntu
Creating the container ubuntu
+ '[' 0 -ne 1 ']'
+ eval '/home/deck/.local/bin/distrobox-create --yes -i registry.fedoraproject.org/fedora-toolbox:39 -n ubuntu'
++ /home/deck/.local/bin/distrobox-create --yes -i registry.fedoraproject.org/fedora-toolbox:39 -n ubuntu
Distrobox named 'ubuntu' already exists.
To enter, run:

distrobox enter ubuntu

+ '[' unknown '!=' running ']'
++ date -u +%FT%T
+ log_timestamp=2024-08-09T20:58:58
+ lilipod --log-level debug start ubuntu
proc_utils.go:24 [debug] ensuring we're either root or fake-root
proc_utils.go:64 [debug] executing [lilipod rootless-helper --log-level debug lilipod --log-level debug start ubuntu]
proc_utils.go:83 [debug] tty not specified, using cmd.Start
proc_utils.go:92 [debug] tty not specified, waiting for child to start
proc_utils.go:95 [debug] tty not specified, releasing child
++ lilipod --log-level debug inspect --type container --format '{{.State.Status}}' ubuntu
+ '[' stopped '!=' running ']'
+ printf '\033[31m Error: could not start entrypoint.\n\033[0m'
 Error: could not start entrypoint.
++ lilipod --log-level debug logs ubuntu
+ container_manager_log=
+ printf '%s\n' ''

+ exit 1
+ cleanup
+ rm -f /home/deck/.cache/distrobox/.ubuntu.fifo
+ '[' -n '' ']'
+ '[' 1 -eq 1 ']'
+ lilipod --log-level debug logs ubuntu
(1)(deck@steamdeck ~)$ 

May be a regression with #1333 as I have 0.0.3 installed. Removing the image and creating it again with 0.0.2 did not resolve the issue. Still says could not start entrypoint.

Update: I tried swapping out the distrobox scripts down to 1.6 to see if that would help, but all had the entry issue. Please let me know what further info I can provide that might help figure out why the entry point doesn't work.

@mirkobrombin
Copy link
Collaborator

There are a lot of information. Can you resume all in concise words? I see you mentioning multiple issues, are they all related or perhaps the same as this one?

@Sunspark-007
Copy link
Author

They are separate issues and 2 are podman but I can summarize them. For issue 1510 here, I would suggest ignoring the podman issues for now, and to use lilipod which is working and go from there.

1509- Documentation omits that if one wants to use podman they need to create a folder and also create a json file before podman works. Usage of lilipod does not require this end-user detective work. To resolve, documentation needs to be updated showing the additional steps, OR the script needs to be updated to create the folder and json file.

1511- After above, podman cannot recognize uid/gid set for user after using the directions to set the subgid subuid. Fails completely. Resolution for now is to not use podman at all and instead use lilipod which doesn't run into this issue.

The original podman install script used to handle things for both issues.

1510- This one demonstrates the problem with both podman and lilipod, but focusing only on lilipod here which is mostly working, one creates the distrobox container, but when you type enter the container, it says you cannot enter because it couldn't start the entrypoint. Maybe it's related to the "tty not specified" strings in the verbose log?

It gets as far as downloading files and creating the container, but you can't enter it. The 1333 mentioned, a user couldn't enter a container with lilipod and the issue was closed as fixed, but it seems to still exist as a regression since all this is a brand new installation of lilipod and creation of container, not an existing one.

Maybe the key for 1510 is to reopen 1333.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants