salt: [BUG] tiamat build 3005rc1 - docker-compose module issue - pip install failure
Description docker-compose fails to install with tiamat’s pip. (works fine on host python3-pip / previous salt 3004) docker-compose library needed inside salt’s python to use docker-compose module in salt states / modules
Setup
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
Steps to Reproduce the behavior
install salt 3005rc1.
attempt to install docker-compose inside tiamat pip
salt-pip install docker-compose
Expected behavior docker-compose to be installed as a python package that salt can use in states / modules
error
salt-pip install docker-compose
Collecting docker-compose
Using cached docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
Collecting websocket-client<1,>=0.32.0
Using cached websocket_client-0.59.0-py2.py3-none-any.whl (67 kB)
Collecting python-dotenv<1,>=0.13.0
Using cached python_dotenv-0.20.0-py3-none-any.whl (17 kB)
Collecting requests<3,>=2.20.0
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting jsonschema<4,>=2.5.1
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting texttable<2,>=0.9.0
Using cached texttable-1.6.4-py2.py3-none-any.whl (10 kB)
Collecting PyYAML<6,>=3.10
Using cached PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (630 kB)
Collecting dockerpty<1,>=0.4.1
Using cached dockerpty-0.4.1.tar.gz (13 kB)
Preparing metadata (setup.py) ... done
Collecting docker[ssh]>=5
Using cached docker-5.0.3-py2.py3-none-any.whl (146 kB)
Collecting docopt<1,>=0.6.1
Using cached docopt-0.6.2.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/saltstack/salt/run/run -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u1z98zxr/docopt_763ce2c8ab8a481686efa46367aa91f0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u1z98zxr/docopt_763ce2c8ab8a481686efa46367aa91f0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jjyfne7x
cwd: /tmp/pip-install-u1z98zxr/docopt_763ce2c8ab8a481686efa46367aa91f0/
Complete output (11 lines):
_distutils_hack/__init__.py:17: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
warnings.warn(
_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "tiamatpip/cli.py", line 352, in _run_code
exec(code, exec_locals)
File "<tiamat-pip-run-code>", line 1, in <module>
File "/tmp/pip-install-u1z98zxr/docopt_763ce2c8ab8a481686efa46367aa91f0/setup.py", line 3, in <module>
from docopt import __version__
ImportError: cannot import name '__version__' from 'docopt' (/opt/saltstack/salt/pypath/lib/python3.9/site-packages/docopt.py)
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz#sha256=49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491 (from https://pypi.org/simple/docopt/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached docopt-0.6.1.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/saltstack/salt/run/run -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u1z98zxr/docopt_19fc0a89e2c04b81af3bcf9bd63d13c2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u1z98zxr/docopt_19fc0a89e2c04b81af3bcf9bd63d13c2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zkky8rqv
cwd: /tmp/pip-install-u1z98zxr/docopt_19fc0a89e2c04b81af3bcf9bd63d13c2/
Complete output (11 lines):
_distutils_hack/__init__.py:17: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
warnings.warn(
_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "tiamatpip/cli.py", line 352, in _run_code
exec(code, exec_locals)
File "<tiamat-pip-run-code>", line 1, in <module>
File "/tmp/pip-install-u1z98zxr/docopt_19fc0a89e2c04b81af3bcf9bd63d13c2/setup.py", line 3, in <module>
from docopt import __version__
ImportError: cannot import name '__version__' from 'docopt' (/opt/saltstack/salt/pypath/lib/python3.9/site-packages/docopt.py)
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ec/6d/8ef19316f3b06c15ac648c857d18f171a65b50319f0a6c782392ad62d942/docopt-0.6.1.tar.gz#sha256=71ad940a773fbc23be6093e9476ad57b2ecec446946a28d30127501f3b29aa35 (from https://pypi.org/simple/docopt/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting docker-compose
Using cached docker_compose-1.29.1-py2.py3-none-any.whl (114 kB)
Using cached docker_compose-1.29.0-py2.py3-none-any.whl (115 kB)
Using cached docker_compose-1.28.6-py2.py3-none-any.whl (114 kB)
Collecting docker[ssh]<5,>=4.4.4
Using cached docker-4.4.4-py2.py3-none-any.whl (147 kB)
Collecting docker-compose
Using cached docker_compose-1.28.5-py2.py3-none-any.whl (114 kB)
Collecting cached-property<2,>=1.2.0
Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting docker-compose
Using cached docker_compose-1.28.4-py2.py3-none-any.whl (114 kB)
Using cached docker_compose-1.28.3-py2.py3-none-any.whl (114 kB)
Using cached docker_compose-1.28.2-py2.py3-none-any.whl (114 kB)
Using cached docker_compose-1.28.0-py2.py3-none-any.whl (114 kB)
Using cached docker_compose-1.27.4-py2.py3-none-any.whl (110 kB)
Using cached docker_compose-1.27.3-py2.py3-none-any.whl (110 kB)
Using cached docker_compose-1.27.2-py2.py3-none-any.whl (110 kB)
Using cached docker_compose-1.27.1-py2.py3-none-any.whl (110 kB)
Using cached docker_compose-1.27.0-py2.py3-none-any.whl (109 kB)
Using cached docker_compose-1.26.2-py2.py3-none-any.whl (139 kB)
Collecting six<2,>=1.3.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting docker-compose
Using cached docker_compose-1.26.1-py2.py3-none-any.whl (139 kB)
Collecting distro<2,>=1.5.0
Using cached distro-1.7.0-py3-none-any.whl (20 kB)
Collecting docker-compose
Using cached docker_compose-1.26.0-py2.py3-none-any.whl (139 kB)
Using cached docker_compose-1.25.5-py2.py3-none-any.whl (139 kB)
Using cached docker_compose-1.25.4-py2.py3-none-any.whl (136 kB)
Using cached docker_compose-1.25.3-py2.py3-none-any.whl (136 kB)
Using cached docker_compose-1.25.2-py2.py3-none-any.whl (136 kB)
Using cached docker_compose-1.25.1-py2.py3-none-any.whl (138 kB)
Collecting PyYAML<5,>=3.10
Using cached PyYAML-3.13.tar.gz (270 kB)
Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-h96txfjm
Distribution docker-compose was not found installed
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3005rc1
Dependency Versions:
cffi: 1.14.6
cherrypy: 18.6.1
dateutil: 2.8.1
docker-py: 5.0.3
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.0
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.17
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.9.12 (main, Jul 15 2022, 15:02:15)
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 20.04 focal
locale: utf-8
machine: x86_64
release: 5.15.0-1014-azure
system: Linux
version: Ubuntu 20.04 focal
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (19 by maintainers)
Will do on Monday. Ive a few other machine types i can roll out on, the docker-compose bug stopped me from any further testing, thanks for the quick re-release
This issue will be fixed once we merge https://gitlab.com/saltstack/open/salt-pkg/-/merge_requests/180 and either create 3005rc1-2 or we release 3005rc2