Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763267 - app-containers/podman-2.1.1: Error: default OCI runtime "crun" not found: invalid argument
Summary: app-containers/podman-2.1.1: Error: default OCI runtime "crun" not found: inv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on: 835974 835975
Blocks:
  Show dependency tree
 
Reported: 2021-01-03 13:04 UTC by Dennis Lamm
Modified: 2022-03-26 01:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Lamm gentoo-dev 2021-01-03 13:04:25 UTC
Maybe conditional dependency on app-emulation/crun is wrong, when crun is not installed the follwing error occurs on a 'podman ps' execution:

'Error: default OCI runtime "crun" not found: invalid argument'

Reproducible: Always

Steps to Reproduce:
1. emerge libpod-2.1.1, with app-emulation/conmon-2.0.22 as dependency
2. execute 'podman ps'
3. result: 'Error: default OCI runtime "crun" not found: invalid argument'
4. emerge app-emulation/crun-0.15 manually
5. 'podman ps' works as expected
Actual Results:  
Error: default OCI runtime "crun" not found: invalid argument

Expected Results:  
Works as expected / intended
Comment 1 Zac Medico gentoo-dev 2021-01-03 21:20:06 UTC
It only defaults to crun if you have cgroups v2 unified hierarchy:

https://github.com/containers/podman/blob/v2.2.1/libpod/runtime.go#L157

We could add a USE=cgroup-hybrid flag like the one that sys-apps/systemd uses to indicate hybrid (legacy) cgroup hierarchy.
Comment 2 Kobboi 2022-03-24 23:42:56 UTC
Hitting this as well. docker and snapd no longer require cgroups-hybrid (although snapd still does in portage: see bug #835818) so maybe it makes sense to have something that works with cgroups v2 as the default?
Comment 3 Larry the Git Cow gentoo-dev 2022-03-25 03:01:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=869ab111563d24bc8186b3dd17328cd8554b3442

commit 869ab111563d24bc8186b3dd17328cd8554b3442
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-03-25 02:58:09 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-03-25 03:01:36 +0000

    app-containers/podman: add cgroup-hybrid USE flag
    
    Closes: https://bugs.gentoo.org/763267
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/metadata.xml        | 3 +++
 app-containers/podman/podman-3.4.4.ebuild | 5 +++--
 app-containers/podman/podman-4.0.2.ebuild | 5 +++--
 3 files changed, 9 insertions(+), 4 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2022-03-25 03:53:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe26469c2047f321138e5dc1f475b7fa786d37ae

commit fe26469c2047f321138e5dc1f475b7fa786d37ae
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-03-25 03:52:51 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-03-25 03:53:36 +0000

    Revert "app-containers/podman: add cgroup-hybrid USE flag"
    
    This reverts commit 869ab111563d24bc8186b3dd17328cd8554b3442
    since crun has missing arm64 and riscv keywords.
    
    Bug: https://bugs.gentoo.org/763267
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/metadata.xml        | 3 ---
 app-containers/podman/podman-3.4.4.ebuild | 5 ++---
 app-containers/podman/podman-4.0.2.ebuild | 5 ++---
 3 files changed, 4 insertions(+), 9 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-03-25 04:01:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1cda8d006a810818e98d7bbe64d3240bf0a67f3

commit e1cda8d006a810818e98d7bbe64d3240bf0a67f3
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-03-25 04:00:08 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-03-25 04:01:07 +0000

    app-containers/podman: prefer crun over runc
    
    Closes: https://bugs.gentoo.org/763267
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/podman-4.0.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 6 Kobboi 2022-03-25 15:41:00 UTC
How exactly does this fix the problem in the description?

I still have runc (needed by containerd, needed by docker), so the above does not pull in crun, so I'm still getting the error.
Comment 7 Zac Medico gentoo-dev 2022-03-25 19:56:43 UTC
(In reply to Kobboi from comment #6)
> How exactly does this fix the problem in the description?
> 
> I still have runc (needed by containerd, needed by docker), so the above
> does not pull in crun, so I'm still getting the error.

True. Maybe a cgroup-hybrid USE flag is a good solution, but we'll need to get crun keyworded for arm64 and riscv.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-25 20:00:27 UTC
(In reply to Zac Medico from comment #7)
> (In reply to Kobboi from comment #6)
> > How exactly does this fix the problem in the description?
> > 
> > I still have runc (needed by containerd, needed by docker), so the above
> > does not pull in crun, so I'm still getting the error.
> 
> True. Maybe a cgroup-hybrid USE flag is a good solution, but we'll need to
> get crun keyworded for arm64 and riscv.

It's done :)
Comment 9 Larry the Git Cow gentoo-dev 2022-03-26 01:41:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09749f23e7eb708f0f26c57a47cbb899595ffe99

commit 09749f23e7eb708f0f26c57a47cbb899595ffe99
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-03-26 01:39:06 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-03-26 01:41:50 +0000

    app-containers/podman: add cgroup-hybrid USE flag
    
    Closes: https://bugs.gentoo.org/763267
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/metadata.xml        | 3 +++
 app-containers/podman/podman-3.4.4.ebuild | 5 +++--
 app-containers/podman/podman-4.0.2.ebuild | 5 +++--
 3 files changed, 9 insertions(+), 4 deletions(-)
Comment 10 Zac Medico gentoo-dev 2022-03-26 01:42:36 UTC
(In reply to Sam James from comment #8)
> (In reply to Zac Medico from comment #7)
> > (In reply to Kobboi from comment #6)
> > > How exactly does this fix the problem in the description?
> > > 
> > > I still have runc (needed by containerd, needed by docker), so the above
> > > does not pull in crun, so I'm still getting the error.
> > 
> > True. Maybe a cgroup-hybrid USE flag is a good solution, but we'll need to
> > get crun keyworded for arm64 and riscv.
> 
> It's done :)

Thanks!