Bug 1752873 - docker-compose is broken
Summary: docker-compose is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docker-compose
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Tomecek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-17 13:05 UTC by Basil Eric Rabi
Modified: 2019-10-26 17:20 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-10-26 17:20:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Basil Eric Rabi 2019-09-17 13:05:39 UTC
Description of problem:
docker-compose up
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2741, in requires
    deps.extend(dm[safe_extra(ext)])
KeyError: 'ssh'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 794, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2744, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: docker 4.0.1 has no such extra feature 'ssh'



Version-Release number of selected component (if applicable):
docker-compose-1.24.1-1.fc31.noarch

How reproducible:
always

Comment 1 Fedora Update System 2019-09-17 13:24:03 UTC
FEDORA-2019-4f251a4e3d has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-4f251a4e3d

Comment 2 Fedora Update System 2019-09-18 02:00:20 UTC
python-docker-4.0.2-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-4f251a4e3d

Comment 3 Mandeep Gill 2019-09-19 12:54:55 UTC
Still broken with the latest python-docker-4.0.2 release on F31 beta

```
$ docker-compose

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2741, in requires
    deps.extend(dm[safe_extra(ext)])
KeyError: 'ssh'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 794, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2744, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: docker 4.0.2 has no such extra feature 'ssh'
```

Comment 4 Tomas Tomecek 2019-09-19 13:24:28 UTC
I'd say this is the problematic line:

  'docker[ssh] >= 3.7.0, < 5',

It is coming from docker-compose's setup.py. I have no idea if there is anything I can fix on python-docker's side to fix this problem. Please advise.

Comment 5 Tomas Tomecek 2019-09-23 13:47:56 UTC
*** Bug 1751723 has been marked as a duplicate of this bug. ***

Comment 6 Tomas Tomecek 2019-09-23 13:51:01 UTC
There is a suggestion in the other bug to build python-docker with [ssh], but there is no such thing, to be honest. I still think we need to patch setup.py of docker-compose.

Calling out to python packaging wizards. Miro, please help me out.

Comment 7 Miro Hrončok 2019-09-23 15:07:50 UTC
See https://github.com/docker/docker-py/blob/8acd2c3d084805df0bbeda4697c8ad7215ff7247/setup.py#L43

Does it work if you install python3-paramiko?

The question of so called "extras" in RPM packaging of Python packages is not entirely solved at all yet, it usually requires some kind of hacking.

What people usually do is that they create a subpackage (metapackage) called python3-docker-ssh that barely requires the extra requires and the base package.

Comment 8 Craig 2019-09-25 18:31:30 UTC
Installing python3-paramiko (specifically python3-paramiko-2.6.0-2.fc31.noarch) does not fix the problem; even with python3-paramiko installed, docker-compose still fails as described in comment 3.

Comment 9 Fedora Update System 2019-09-26 00:01:42 UTC
python-docker-4.0.2-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Craig 2019-09-26 15:11:13 UTC
Please reopen this issue.

I'm using Fedora 31 and have installed python3-docker-4.0.2-1.fc31 and I am still having this issue as described in comment 3.

Thank you!

Comment 11 Miro Hrončok 2019-09-26 15:30:25 UTC
<mock-chroot> sh-5.0# docker-compose 
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2741, in requires
    deps.extend(dm[safe_extra(ext)])
KeyError: 'ssh'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 794, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2744, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: docker 4.0.2 has no such extra feature 'ssh'
<mock-chroot> sh-5.0# rpm -q docker-compose
docker-compose-1.24.1-1.fc31.noarch
<mock-chroot> sh-5.0# rpm -q python3-docker
python3-docker-4.0.2-1.fc31.noarch

Comment 12 Julien Enselme 2019-09-29 15:00:03 UTC
It seems to come from docker-compose. Running `dnf downgrade docker-compose` to switch back to docker-compose 1.22 fixed it for me.

Comment 13 Fedora Update System 2019-10-01 09:20:45 UTC
FEDORA-2019-db8dafc559 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-db8dafc559

Comment 14 Tomas Tomecek 2019-10-01 09:24:50 UTC
Miro, thanks for the help.


Finally figured it out:

$ podman run --rm -ti fedora:31 bash

[root@918d0d0a0bcd /]# dnf install https://kojipkgs.fedoraproject.org//work/tasks/8783/37978783/python3-docker-4.0.2-2.fc31.noarch.rpm
...
Installed:
  python3-docker-4.0.2-2.fc31.noarch

[root@918d0d0a0bcd /]# dnf install docker-compose
...
Installed:
  docker-compose-1.24.1-1.fc31.noarch

[root@918d0d0a0bcd /]# docker-compose -h
Define and run multi-container applications with Docker.

Usage:
  docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
  docker-compose -h|--help

Options:
  -f, --file FILE             Specify an alternate compose file
                              (default: docker-compose.yml)
...

Comment 15 Fedora Update System 2019-10-02 15:53:08 UTC
python-docker-4.0.2-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-db8dafc559

Comment 16 Fedora Update System 2019-10-26 17:20:53 UTC
python-docker-4.0.2-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.