user-cont / conu

conu - python API for your containers
http://conu.readthedocs.io/en/latest/
MIT License
164 stars 33 forks source link

testing with conu fails on RHEL8 #374

Closed phracek closed 4 years ago

phracek commented 4 years ago

Hi folks,

we use conu for testing https://github.com/sclorg/s2i-ruby-container but it fails with traceback on socket connection.

See: https://gist.github.com/rhscl-bot/b37760c7c7e8b34482046450c38d378d#file-s2i-ruby-container-22-sh-L3109

Is this somehow related to conu, podman or even with https://github.com/containers/libpod?

The corresponding PR with the traceback occurs is here: https://github.com/sclorg/s2i-ruby-container/pull/224

Thank you for looking at this bug.

lachmanfrantisek commented 4 years ago

@phracek Sorry for the late response.

It looks like a problem with the connection to docker socket on RHEL8:

E   docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Can you verify the docker works well there? Maybe Tomáš can say more -- he's the maintainer of docker-py in RHEL. (Unfortunately, he's on the PTO.)

Is this somehow related to conu, podman or even with https://github.com/containers/libpod?

I don't think so. The exception was raised in docker-py.

phracek commented 4 years ago

Thanks for the response.

And yes, docker binary works properly as can be seen here (https://gist.github.com/rhscl-bot/b37760c7c7e8b34482046450c38d378d#file-s2i-ruby-container-22-sh-L3027)

We are able to build a container by the docker binary.

pkubatrh commented 4 years ago

Please note that on rhel8 docker == podman

TomasTomecek commented 4 years ago
E   docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

It seems that /var/run/docker.sock is not present. So conu can't work, because it uses python-docker under the hood.

Please note that on rhel8 docker == podman

If this implies that you use podman binary as docker binary, then you can't use DockerBackend of conu.

I suggest checking out the PodmanBackend in conu.

Hence this is not a bug in conu. If you want to use DockerBackend together w/ conu, you'll probably need to send a PR to make that work.