saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.15k stars 5.48k forks source link

[BUG] aiohttp installation (via salt-heist) fails on 3006.6 #65972

Open max-arnold opened 8 months ago

max-arnold commented 8 months ago

Description

Trying to install salt-heist into 3006.6 relenv fails:

salt-pip install heist-salt==6.0.2

Collecting heist-salt
  Downloading heist_salt-6.0.2-py3-none-any.whl.metadata (2.5 kB)
Collecting asyncssh (from heist-salt)
  Downloading asyncssh-2.14.2-py3-none-any.whl.metadata (9.9 kB)
Collecting pop>=16.3 (from heist-salt)
  Downloading pop-27.1.0-py3-none-any.whl.metadata (4.9 kB)
Requirement already satisfied: packaging in /opt/saltstack/salt/lib/python3.10/site-packages (from heist-salt) (22.0)
Collecting aiohttp~=3.7.2 (from heist-salt)
  Downloading aiohttp-3.7.4.post0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 4.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      Fatal Python error: init_import_site: Failed to import the site module
      Python runtime state: initialized
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 617, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 610, in main
          execsitecustomize()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 932, in wrapper
          import sitecustomize
        File "/tmp/pip-build-env-15jze4p3/site/sitecustomize.py", line 23, in <module>
          site.addsitedir(path)
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 216, in addsitedir
          sitedir, sitedircase = makepath(sitedir)
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 97, in makepath
          dir = os.path.join(*paths)
        File "/opt/saltstack/salt/lib/python3.10/posixpath.py", line 76, in join
          a = os.fspath(a)
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
The same thing works fine on 3006.5 ```yaml salt-pip install heist-salt Collecting heist-salt Downloading heist_salt-6.0.2-py3-none-any.whl (30 kB) Collecting aiohttp~=3.7.2 Downloading aiohttp-3.7.4.post0.tar.gz (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 4.4 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting heist Downloading heist-6.3.3-py3-none-any.whl (29 kB) Collecting pop>=16.3 Downloading pop-27.1.0-py3-none-any.whl (43 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.7/43.7 kB 15.1 MB/s eta 0:00:00 Collecting asyncssh Downloading asyncssh-2.14.2-py3-none-any.whl (352 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 352.5/352.5 kB 38.1 MB/s eta 0:00:00 Requirement already satisfied: packaging in /opt/saltstack/salt/lib/python3.10/site-packages (from heist-salt) (22.0) Collecting attrs>=17.3.0 Downloading attrs-23.2.0-py3-none-any.whl (60 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.8/60.8 kB 20.3 MB/s eta 0:00:00 Collecting typing-extensions>=3.6.5 Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB) Collecting chardet<5.0,>=2.0 Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.7/178.7 kB 35.8 MB/s eta 0:00:00 Collecting multidict<7.0,>=4.5 Downloading multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.5/114.5 kB 30.2 MB/s eta 0:00:00 Collecting async-timeout<4.0,>=3.0 Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB) Collecting yarl<2.0,>=1.0 Downloading yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 301.6/301.6 kB 52.7 MB/s eta 0:00:00 Collecting pop-loop<2.0.0,>=1.0.5 Downloading pop_loop-1.1.0-py3-none-any.whl (13 kB) Collecting dict-toolbox>=2.1.2 Downloading dict_toolbox-5.0.0-py3-none-any.whl (33 kB) Requirement already satisfied: PyYAML>=6.0.1 in /opt/saltstack/salt/lib/python3.10/site-packages (from pop>=16.3->heist-salt) (6.0.1) Collecting lazy-object-proxy Downloading lazy_object_proxy-1.10.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (68 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.3/68.3 kB 21.7 MB/s eta 0:00:00 Collecting pop-config>=8.0.2 Downloading pop_config-12.0.4-py3-none-any.whl (38 kB) Requirement already satisfied: cryptography>=39.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from asyncssh->heist-salt) (41.0.7) Collecting ClusterShell>=1.8.1 Downloading ClusterShell-1.9.2.tar.gz (400 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 400.9/400.9 kB 45.8 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting rend>=6 Downloading rend-7.0.2-py3-none-any.whl (18 kB) Requirement already satisfied: cffi>=1.12 in /opt/saltstack/salt/lib/python3.10/site-packages (from cryptography>=39.0->asyncssh->heist-salt) (1.14.6) Collecting aiofiles>=0.7.0 Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB) Requirement already satisfied: msgpack!=0.5.5,>=0.5 in /opt/saltstack/salt/lib/python3.10/site-packages (from dict-toolbox>=2.1.2->pop>=16.3->heist-salt) (1.0.2) Collecting sniffio Downloading sniffio-1.3.0-py3-none-any.whl (10 kB) Collecting nest-asyncio Downloading nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB) Requirement already satisfied: jinja2>=3.0.1 in /opt/saltstack/salt/lib/python3.10/site-packages (from rend>=6->heist->heist-salt) (3.1.2) Collecting toml Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) Collecting colorama>=0.4.5 Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB) Requirement already satisfied: idna>=2.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from yarl<2.0,>=1.0->aiohttp~=3.7.2->heist-salt) (3.2) Requirement already satisfied: pycparser in /opt/saltstack/salt/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=39.0->asyncssh->heist-salt) (2.21) Requirement already satisfied: MarkupSafe>=2.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from jinja2>=3.0.1->rend>=6->heist->heist-salt) (2.1.2) Building wheels for collected packages: aiohttp, ClusterShell Building wheel for aiohttp (pyproject.toml) ... done Created wheel for aiohttp: filename=aiohttp-3.7.4.post0-py3-none-any.whl size=451922 sha256=d6beaeb8962dfd410ea6093325d2778f436550b7e54b749727df6114bf7cc80a Stored in directory: /root/.cache/pip/wheels/92/bc/04/f42556c88bde486707e29be109352ee0263b6413b0e25dc824 Building wheel for ClusterShell (setup.py) ... done Created wheel for ClusterShell: filename=ClusterShell-1.9.2-py3-none-any.whl size=410732 sha256=00179b124e509a88b5b2104993096e3cf13bd74d576f8e1eee6b97b364b0108b Stored in directory: /root/.cache/pip/wheels/62/6f/db/4ce37a04bd6724c373141492f7d5857f520b10ed9a33e4df0f Successfully built aiohttp ClusterShell Installing collected packages: typing-extensions, toml, sniffio, nest-asyncio, multidict, lazy-object-proxy, colorama, ClusterShell, chardet, attrs, async-timeout, aiofiles, yarl, dict-toolbox, asyncssh, aiohttp, rend, pop-loop, pop-config, pop, heist, heist-salt Do not adjust rpath of /tmp/pip-target-j66tffvg/multidict/_multidict.cpython-310-x86_64-linux-gnu.so Do not adjust rpath of /tmp/pip-target-j66tffvg/lazy_object_proxy/cext.cpython-310-x86_64-linux-gnu.so Do not adjust rpath of /tmp/pip-target-j66tffvg/yarl/_quoting_c.cpython-310-x86_64-linux-gnu.so Successfully installed ClusterShell-1.9.2 aiofiles-23.2.1 aiohttp-3.7.4.post0 async-timeout-3.0.1 asyncssh-2.14.2 attrs-23.2.0 chardet-4.0.0 colorama-0.4.6 dict-toolbox-5.0.0 heist-6.3.3 heist-salt-6.0.2 lazy-object-proxy-1.10.0 multidict-6.0.4 nest-asyncio-1.6.0 pop-27.1.0 pop-config-12.0.4 pop-loop-1.1.0 rend-7.0.2 sniffio-1.3.0 toml-0.10.2 typing-extensions-4.9.0 yarl-1.9.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: There was an error checking the latest version of pip. ```

Setup

max-arnold commented 8 months ago

CC @Akm0d

chateaulav commented 8 months ago

Same issue with mysqlclient and libvirt-python

root@controller-b91af509-111a-5d33-a6be-350991c46ccd:~# pip install libvirt-python
Requirement already satisfied: libvirt-python in /usr/lib/python3/dist-packages (8.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@controller-b91af509-111a-5d33-a6be-350991c46ccd:~# salt-pip install libvirt-python
Collecting libvirt-python
  Using cached libvirt-python-10.0.0.tar.gz (246 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      Fatal Python error: init_import_site: Failed to import the site module
      Python runtime state: initialized
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 617, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 610, in main
          execsitecustomize()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 932, in wrapper
          import sitecustomize
        File "/tmp/pip-build-env-gf4zzfsn/site/sitecustomize.py", line 23, in <module>
          site.addsitedir(path)
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 216, in addsitedir
          sitedir, sitedircase = makepath(sitedir)
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 97, in makepath
          dir = os.path.join(*paths)
        File "/opt/saltstack/salt/lib/python3.10/posixpath.py", line 76, in join
          a = os.fspath(a)
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
chateaulav commented 8 months ago

referencing https://github.com/saltstack/salt/issues/65025, issue was resolved through pinning pip at 22.3.1