saltstack / saltstack/salt

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

Open
#65,972 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

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
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

  • Ubuntu 22.04 or Rocky Linux 9.2
  • Salt Minion 3006.6 installed via salt-bootstrap.sh

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the salt-pip install heist-salt==6.0.2 failure in the Salt 3006.6 relenv on Ubuntu 22.04 or Rocky Linux 9.2. Start with relenv/runtime.py and the temporary sitecustomize.py shown in the traceback, comparing behavior with 3006.5. Done means aiohttp and heist-salt install successfully on 3006.6 without the site initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.