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

"Could not get runtime: unknown event logger type" on Fedora 31 Beta Silverblue #4210

Closed
Zlopez opened this issue Oct 7, 2019 · 27 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Zlopez
Copy link

Zlopez commented Oct 7, 2019

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description
Various podman commands fails with Error: could not get runtime: unknown event logger type: on Fedora 31 Beta Silverblue

Steps to reproduce the issue:

  1. podman ps

Describe the results you received:
Error: could not get runtime: unknown event logger type:

Describe the results you expected:
List of containers

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Error: could not get runtime: unknown event logger type:

but output of podman --version:
podman version 1.6.1

Output of podman info --debug:

Error: could not get runtime: unknown event logger type:

Package info (e.g. output of rpm -q podman or apt list podman):

podman-1.6.1-2.fc31.x86_64

Additional environment details (AWS, VirtualBox, physical, etc.):
Physical machine

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 7, 2019
@mheon
Copy link
Member

mheon commented Oct 7, 2019

Running as root, or rootless?

Can you provide your libpod.conf? As root, /etc/containers/libpod.conf or /usr/share/libpod.conf; without root, $HOME/.config/containers/libpod.conf.

@Zlopez
Copy link
Author

Zlopez commented Oct 7, 2019

I'm running rootless podman, here is the libpod.conf

olume_path = "/var/home/zlopez/.local/share/containers/storage/volumes"
image_default_transport = "docker://"
runtime = "/usr/bin/crun"
runtime_path = ["/usr/bin/runc", "/usr/sbin/runc", "/usr/local/bin/runc", "/usr/local/sbin/runc", "/sbin/runc", "/bin/runc", "/usr/lib/cri-o-runc/sbin/runc"]
conmon_path = ["/usr/libexec/podman/conmon", "/usr/libexec/crio/conmon", "/usr/local/lib/podman/conmon", "/usr/local/libexec/crio/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", "/usr/lib/crio/bin/conmon"]
conmon_env_vars = ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
cgroup_manager = "cgroupfs"
init_path = "/usr/libexec/podman/catatonit"
static_dir = "/var/home/zlopez/.local/share/containers/storage/libpod"
tmp_dir = "/run/user/1000/libpod/tmp"
max_log_size = -1
no_pivot_root = false
cni_config_dir = "/etc/cni/net.d/"
cni_plugin_dir = ["/usr/libexec/cni", "/usr/lib/cni", "/usr/local/lib/cni", "/opt/cni/bin"]
infra_image = "k8s.gcr.io/pause:3.1"
infra_command = "/pause"
enable_port_reservation = true
label = true
network_cmd_path = ""
num_locks = 0 
events_logger = ""
events_logfile_path = ""
detach_keys = ""
SDNotify = false
cgroup_check = true

@mheon
Copy link
Member

mheon commented Oct 7, 2019

Your config seems to be missing two fields that I have related to events.

events_logger = "file"
EventsLogFilePath = ""

Try adding those to the end your your user's libpod.conf

@Zlopez
Copy link
Author

Zlopez commented Oct 7, 2019

I tried to add the two lines and got this

Error: could not get runtime: error decoding configuration file /home/zlopez/.config/containers/libpod.conf: Near line 26 (last key parsed 'events_logger'): Key 'events_logger' has already been defined.

@mheon
Copy link
Member

mheon commented Oct 7, 2019

Ahh - they're already in there, between num_locks and detach_keys.

You can remove the new ones you added and just modify the existing ones - events_logger to "file" should be sufficient

@Zlopez
Copy link
Author

Zlopez commented Oct 7, 2019

Added "file" to events_logger and got this

Error: could not get runtime: no valid executable found for OCI runtime runc: invalid argument

@mheon
Copy link
Member

mheon commented Oct 7, 2019

At this point, I would recommend removing $HOME/.config/containers/libpod.conf entirely, so Podman will automatically re-generate it from the root defaults - that should get you a working system.

@rhatdan FYI - it looks like the migration code ran, but he doesn't have the new runtime paths sections (older Podman generated this config), so the migration to crun failed.

@Zlopez
Copy link
Author

Zlopez commented Oct 7, 2019

@mheon This did the trick, thanks.

@GoodMirek
Copy link

Same issue here, happened after upgrade from FC30 Workstation (dnf based) to FC31 Workstation (dnf based).
After removing $HOME/.config/containers/libpod.conf entirely, i can run podman version, but cannot start any of my old pet containers (e.g. toolbox) and have to remove and recreate them.

@Zlopez
Copy link
Author

Zlopez commented Oct 16, 2019

@GoodMirek There was some regression in podman (containers/toolbox#277) which unfortunately prevented toolbox enter on old containers. I needed to create a new one when this issue was fixed.

@GoodMirek
Copy link

@Zlopez Thanks for your very fast response. Actually, I had to remove all my old pet containers, not only toolbox ones, e.g. also pgadmin4. Sure I can manage that and I intentionally test beta versions to find issues, but if that happened to regular users after upgrade from FC30, once FC31 is Generally Available, it would not be the best user experience.

@Zlopez
Copy link
Author

Zlopez commented Oct 16, 2019

@GoodMirek I absolutely agree with you.

There are two issues that will be unfortunate for any user upgrading to F31. This one, where you need to regenerate $HOME/.config/containers/libpod.conf and the regression in podman create which will prevent you to use any previously created container. I personally thought that this was solved together with containers/toolbox#277, but it seems that this affects every user who does update from F30 to F31. I'm not sure if there is time to actually do anything about it when the release of F31 is closing up.

@mheon
Copy link
Member

mheon commented Oct 16, 2019 via email

@GoodMirek
Copy link

On a different instance (FC31 Silverblue Kinoite), after deleting $HOME/.config/containers/libpod.conf , I get the following error now:

podman ps -a
ERRO[0001] Error retrieving container 9aee254d7eb0058257520d088547de8d123109b3b9396ec0888917a2aa501a7a from the database: container 9aee254d7eb0058257520d088547de8d123109b3b9396ec0888917a2aa501a7a was created with OCI runtime runc, but that runtime is not available in the current configuration: internal libpod error

Error message has been truncated - other containers followed with the same error.
Commands podman rm -a and podman rmi -a fail with the same error.

@mheon
Copy link
Member

mheon commented Oct 17, 2019

That is fixed in 1.6.2

@mheon
Copy link
Member

mheon commented Oct 24, 2019

1.6.2 should now be in the Fedora 31 repos. I believe it will be available in the default install, and will not require a day 1 upgrade.

For folks finding this from a search engine, if you encounter difficulty launching containers after an upgrade to F31, we recommend the following:

  • Whenever possible, remove containers created in older Fedora versions and recreate with F31 Podman - this is inconvenient, but the safest option
  • If you have containers you do not wish to recreate, you can run podman system migrate --runtime crun to convert them to work on Fedora 31. There is, however, a chance that some containers will not work after the migration.
  • If you encounter issues where Podman will not launch due to an unknown event logger, we recommend removing $HOME/.config/containers/libpod.conf (assuming you have not modified your copy). Podman will regenerate the configuration file with sane defaults for F31.

Closing this as such. Feel free to open new issues with any further migration difficulties that appear.

@mheon mheon closed this as completed Oct 24, 2019
@fbruetting
Copy link

Still had this issue in Podman v1.6.2 and needed to delete libpod.conf :/

@rgolangh
Copy link

rgolangh commented Nov 5, 2019

F31 upgrade, podman v1.6.2, libpod.conf removed, running rootless, and now trying to start a previously stopped container:

08:25 $ podman  start pg11
Error: unable to start container "pg11": systemd cgroup flag passed, but systemd support for managing cgroups is not available: OCI runtime error

Inspecting:

08:28 $ podman inspect pg11 | rg cgroup -A 2 -B 2
            "--log-level",
            "error",
            "--cgroup-manager",
            "cgroupfs",
            "--tmpdir",
            "/run/user/1000/libpod/tmp",

This was working on F30.

@mheon
Copy link
Member

mheon commented Nov 5, 2019

Can you check in inspect if the container's runtime is set to crun or runc? I suspect your container is still on the runc runtime, and you'll need to run podman system migrate --runtime crun to get it on crun.

@prototact
Copy link

I have a similar issue in Fedora 31, where podman is working under root but as user I receive the following error:

'''
Error: could not get runtime: unknown event logger type:
'''

I ran the command to migrate to the new runtime but the problem persists. Also, there is no libpod.conf.

@rgolangh
Copy link

rgolangh commented Nov 6, 2019

Can you check in inspect if the container's runtime is set to crun or runc? I suspect your container is still on the runc runtime, and you'll need to run podman system migrate --runtime crun to get it on crun.

I couldn't get the migrate to do it. It simply ignored the migrate. Eventually I had to recreate the container.

@mheon
Copy link
Member

mheon commented Nov 6, 2019

@orpheusgame You almost certainly have a libpod.conf - rootless Podman will automatically create one if it doesn't exist. Are you sure that there is no ~/.config/containers/libpod.conf?

@prototact
Copy link

@mheon yes turns out there was one in the location you mentioned from fedora 30 (i upgraded yesterday). i removed it and podman regenerated one on its own. now everything is fine, no sudoers group required. good stuff.

@jboero
Copy link

jboero commented Dec 10, 2019

Same issues here even after all workarounds in this thread. I don't want to add fuel to the fire here but if Podman is going to snuff out Docker, it's clearly not ready yet and maybe the crippling cgroup changes need to go back into Beta (or Rawhide) until it is. OpenShift? Broke. Containers? Broke. This not a good strategy.

 jboero  xps  ~  $  podman ps
CONTAINER ID  IMAGE  COMMAND  CREATED  STATUS  PORTS  NAMES
 jboero  xps  ~  $  docker ps
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
CONTAINER ID  IMAGE  COMMAND  CREATED  STATUS  PORTS  NAMES
 jboero  xps  ~  $  oc cluster up
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
error: unexpected error inspecting image openshift/origin-control-plane:v3.11
 jboero  xps  ~  $ 

Workaround
In the end, I needed to default back to Docker by adding systemd.unified_cgroup_hierarchy=0 kernel param. In fact grubby is also broken now so I needed to manually add it in /etc/default/grub and grub2-mkconfig -o /boot/grub2/grub.cfg and reboot. Then docker (now moby v18) works again and so does OpenShift / origin.

@mheon
Copy link
Member

mheon commented Dec 10, 2019

That doesn't sound like any of the issues I've seen in this thread. A reproducer or bug would be greatly appreciated - we can only fix things when they're reported.

@mheon
Copy link
Member

mheon commented Dec 10, 2019

Also, for reference, the migration issue originally referenced here ("unknown event logger type") should be fixed in the upcoming Podman 1.7.0. Existing installations that used the old migration code will still need to manually remove libpod.conf, but new installations should not see this problem.

mheon added a commit to mheon/libpod that referenced this issue Dec 10, 2019
In the process, make everything in the config omitempty in TOML.
We're seeing issues (notably [1]) where, after rewriting
libpod.conf, fields that were not previously populated are
written - and, because they were not previously written, they are
included as empty. This is unfortunately different from not
included at all - it means that we need to assume the user
explicitly unset the value, and we can't use defaults. Setting
omitempty prevents us from writing things that should not be
written as they were not set originally.

[1] containers#4210

Signed-off-by: Matthew Heon <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Dec 11, 2019

Docker and Kubernetes was blocking the move to cgroup V2 for many years. The move to Cgroup V2 was to spur these upstreams to move, and if you follow what is going on in Kubernetes and runc world, this is happening. I do not believe these projects would have moved to V2 unless a distro started defaulting to V2, and Fedora is supposed to be the leader in new technology.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

9 participants