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

split runc rpm (for co-installing Docker and Podman) #210

Open
AkihiroSuda opened this issue Dec 8, 2020 · 19 comments · May be fixed by #231
Open

split runc rpm (for co-installing Docker and Podman) #210

AkihiroSuda opened this issue Dec 8, 2020 · 19 comments · May be fixed by #231

Comments

@AkihiroSuda
Copy link
Contributor

Currently, Docker and Podman cannot be installed together on CentOS 8.3 with their official RPMs:

# curl -fsSL https://get.docker.com | CHANNEL=test sh
# rpm -qa docker* containerd* | sort
containerd.io-1.4.3-3.1.el8.x86_64
docker-ce-20.10.0-2.2.rc2.el8.x86_64
docker-ce-cli-20.10.0-2.2.rc2.el8.x86_64
docker-ce-rootless-extras-20.10.0-2.2.rc2.el8.x86_64
# dnf install -y podman
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:05:43 ago on Tue Dec  8 10:46:14 2020.
Error: 
 Problem: problem with installed package containerd.io-1.4.3-3.1.el8.x86_64
  - package containerd.io-1.4.3-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - installed package containerd.io-1.4.3-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.3.9-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.3.9-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.4.1-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.4.1-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.4.3-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.4.3-3.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package containerd.io-1.4.3-3.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
  - package podman-2.0.5-5.module_el8.3.0+512+b3b58dca.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed
  - conflicting requests
  - package runc-1.0.0-64.rc10.module_el8.3.0+479+69e2ae26.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Would it be possible to split runc rpm from containerd.io rpm, to resolve the dependency conflict above?

@demiscuzz
Copy link

I would also like to know the answer to this.

@DawidIzydor
Copy link

For a workaround, removing runc and then installing containerd works (because containerd installs it back anyway)

yum remove runc

@demiscuzz
Copy link

For a workaround, removing runc and then installing containerd works (because containerd installs it back anyway)

yum remove runc

Thank you.

@goeranu
Copy link

goeranu commented Apr 25, 2021

Please explain how removing runc could solve the problem. I can't get it to work, and I don't understand how it could.

The podman package depends on runc in the package sense. When I remove runc, podman will also be removed. I can then install docker-ce and its containerd dependency. But if I after that try to install podman again I get all the error messages in the description above.

There is a runc binary in the containerd package, but the package doesn't provide the name runc in the RPM sense.

It is quite possible to install either podman or docker, but I can't seem to have both. Co-installing them, as t he subject says.

The only way to get both installed I have found is by overriding the requirements as in rpm -i --nodeps --replacefiles but that is not a long time sustainable solution. (If I do it, both systems seem to be happy, though. I can start both a docker and a podman container simultaneously. None of them have runc as their parent in the process tree.)

One option to solve this would be for containerd to provide runc of an appropriate version. According to the Fedora Packaging Guidelines which seems to be one of the more developed RPM packaging guidelines, if a package is compatible enough to replace another package it should obsolete and provide that package name (but not conflict it). The runc package in the OS is based on the Opencontainers version of runc. It is beyond me to understand if the “compatible enough” requirement applies here.

But the original solution suggested above is probably better, to create a separate subpackage called for example containerd-runc during the RPM build. That is similar to how it is being done with the docker compatibility script prodman provides. You can install it as a separate package, called podman-docker if you wish to have a docker command that actually runs podman. But if you don't want that, for example because you want to run the real docker too on the same machine, then you can simply omit this package. Podman itself will work just fine.

@goeranu goeranu linked a pull request Apr 30, 2021 that will close this issue
@alexarefev
Copy link

Hi there!
We have resolved the same issue by installing podman according to Podman installation

@maglo
Copy link

maglo commented Sep 7, 2021

I just tested on CentOS 8.3:

Installing podman with

sudo yum module enable -y container-tools:rhel8
sudo yum module install -y container-tools:rhel8

and (trying to install) Docker with

sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io

it fails as described in issue.

@maglo
Copy link

maglo commented Dec 7, 2021

Any progress on this? really annoying if you ask me, causing us to have to do multiple shenanigans and workarounds.

@Machindra220
Copy link

Machindra220 commented Jan 13, 2022

I've also received same problem as mentioned in description, But I've did the following steps and then can able to install docker on my centos8.

  1. sudo yum erase podman buildah
  2. sudo yum remove runc
  3. sudo yum install -y yum-utils
  4. sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  5. sudo yum install docker-ce docker-ce-cli containerd.io

And I can able to use docker on my CentOS8.

So, is this going to create any problem in future, if Podman is not installed ?

Thanks.

@maglo
Copy link

maglo commented Feb 17, 2022

The problem is still that you might want both podman and docker on the same host.

And be able to run dnf update without hickups.

@RanabirChakraborty
Copy link

Any update on this issue? I don;t understand what's the issue with working with podman and docker at the same time.

@AkihiroSuda
Copy link
Contributor Author

@thaJeztah WDYT?

@jasonbrianhall
Copy link

Having this same issue. Seems to work on Fedora 35 but doesn't work on RHEL8.

@Romain-Geissler-1A
Copy link
Contributor

It's not exactly a real split of the two packages, but two pull requests (the second one being inspired by the first one) are pending since some time, which would simply fix this issue: #231 and #272

Note that I don't think there is a need anymore for the docker/moby project to package runc explicitly, as you can now find official runc packages for all popular distros these days, directly maintained by the distros itself. So technically, instead of doing the changes mentionned above just for RHELs, I would rather start doing it for all recent distros.

Why does it work on Fedora while it doesn't on RHEL 8/9 which are based on Fedora ? Because podman in Fedora depends only on crun (an alternative implementation to runc), while RHEL 8 podman depends on runc, and RHEL 9 podman depends on both crun and runc (but effectively uses only crun if both are present). So, if RHEL 9 podman did depend only on crun, people wouldn't have this issue to co-install podman and docker (but IMO the docker package shall be fixed, this is the root cause of this problem).

@goeranu
Copy link

goeranu commented May 23, 2022

Why does it work on Fedora while it doesn't on RHEL 8/9 which are based on Fedora ?

In addition to what you said, also note that containerd is natively included in Fedora's own repositories. You typically don't need, and I would guess most people don't, get the packaging made here when using Fedora. The Fedora packaging is naturally cleaner. It doesn't bundle runc, it just have a simple RPM dependency on it.

@Romain-Geissler-1A
Copy link
Contributor

Note: this will be worked around on CentOS 9/RHEL 9 side as soon as podman 4.1.x will hit rpm repositories, thanks to this change made today in the podman packaging: https://gitlab.com/redhat/centos-stream/rpms/podman/-/merge_requests/176/diffs?commit_id=f327e88a08ca224b4d20b93a44f234dfb525e0b5

@Romain-Geissler-1A
Copy link
Contributor

Romain-Geissler-1A commented Jun 7, 2022

Note that right now the initial problem doesn't happen anymore on CentOS Stream 9 (Stream 8 still has it), thanks to the above mentionned workaround about runc/crun made by Red Hat.

RHEL 9 still has the problem, as RHEL 9 still uses podman 4.0. Red Hat expects to ship podman 4.1 to RHEL 9 around august (don't take this for granted, dates can always be delayed in case of issues).

@koryaga
Copy link

koryaga commented Jun 30, 2022

Guys, any chance to make this separation for RHEL8 ? We are interested in this activity and ready for possible contribution if necessary.

@Romain-Geissler-1A
Copy link
Contributor

Romain-Geissler-1A commented Jun 30, 2022

Contributions are these since months, it was started by @goeranu, but for a reason I don't get, these aren't merged while I don't think there still are any pending comment that was left unaddressed.

On my side, I just wait for the new RHEL 9 podman package, that should come around august (no guarantee here). I advise you to abandon RHEL 8 if you can, and migrate to RHEL 9, and wait couple of month to benefit from the Red Hat workaround.

@Romain-Geissler-1A
Copy link
Contributor

Installing podman and docker-ce now works on RHEL 9/UBI 9. It doesn't on RHEL 8/UBI 8.

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

Successfully merging a pull request may close this issue.