Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][3006.1] salt-pip is available in non onedir installations #64249

Closed
8 tasks
network-shark opened this issue May 6, 2023 · 2 comments · Fixed by #64954
Closed
8 tasks

[BUG][3006.1] salt-pip is available in non onedir installations #64249

network-shark opened this issue May 6, 2023 · 2 comments · Fixed by #64954
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@network-shark
Copy link
Contributor

Description
Can't execute salt-pip

Setup
salt is installed via pip

Please be as specific as possible and give set-up details.

  • on-prem machine
  • [x ] 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
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
Enter salt-pip

Expected behavior
salt-pip should be executable

(salt3006rc1) sharky@debian-dev:~/venv$ source  /home/sharky/venv/new_env_3006.1/bin/activate
(new_env_3006.1) sharky@debian-dev:~/venv$ salt-pip
Traceback (most recent call last):
  File "/home/sharky/venv/new_env_3006.1/bin/salt-pip", line 8, in <module>
    sys.exit(salt_pip())
  File "/home/sharky/venv/new_env_3006.1/lib/python3.9/site-packages/salt/scripts.py", line 615, in salt_pip
    extras = str(sys.RELENV / "extras-{}.{}".format(*sys.version_info))
AttributeError: module 'sys' has no attribute 'RELENV'
[ERROR   ] An un-handled exception was caught by Salt's global exception handler:
AttributeError: module 'sys' has no attribute 'RELENV'
Traceback (most recent call last):
  File "/home/sharky/venv/new_env_3006.1/bin/salt-pip", line 8, in <module>
    sys.exit(salt_pip())
  File "/home/sharky/venv/new_env_3006.1/lib/python3.9/site-packages/salt/scripts.py", line 615, in salt_pip
    extras = str(sys.RELENV / "extras-{}.{}".format(*sys.version_info))
AttributeError: module 'sys' has no attribute 'RELENV'
(new_env_3006.1) sharky@debian-dev:~/venv$ which salt-pip
/home/sharky/venv/new_env_3006.1/bin/salt-pip


(new_env_3006.1) sharky@debian-dev:~/venv$ salt -V
Salt Version:
          Salt: 3006.1

Python Version:
        Python: 3.9.2 (default, Feb 28 2021, 17:03:44)

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.1.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.5
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.17
        pygit2: Not Installed
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 25.0.2
        relenv: Not Installed
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: debian 11.2 bullseye
        locale: utf-8
       machine: x86_64
       release: 5.10.0-12-amd64
        system: Linux
       version: Debian GNU/Linux 11.2 bullseye

Additional context
Add any other context about the problem here.

@network-shark network-shark added Bug broken, incorrect, or confusing behavior needs-triage labels May 6, 2023
@network-shark
Copy link
Contributor Author

network-shark commented May 6, 2023

Got help in slack . I didn't know that if I install salt via pip , I don't need to use salt-pip.... . Installing packages with pip works fine.

salt-pip is working in my 3006rc3 venv , but maybe this was never intended

@s0undt3ch
Copy link
Member

s0undt3ch commented May 6, 2023

Yes, not intended and an oversight.

salt-pip must not be available, unless it's in a onedir environment.

@s0undt3ch s0undt3ch added this to the Sulfur v3006.2 milestone May 6, 2023
@s0undt3ch s0undt3ch changed the title [BUG][3006.1] salt-pip is broken 'sys' has no attribute 'RELENV' [BUG][3006.1] salt-pip is available in non onedir installations May 6, 2023
s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Aug 10, 2023
…ir` environment.

Fixes saltstack#64249

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Aug 11, 2023
…ir` environment.

Fixes saltstack#64249

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Aug 11, 2023
…ir` environment.

Fixes saltstack#64249

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Aug 15, 2023
…ir` environment.

Fixes saltstack#64249

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
@Ch3LL Ch3LL closed this as completed in 9d7bec1 Aug 24, 2023
techhat pushed a commit to techhat/salt that referenced this issue Sep 6, 2023
…ir` environment.

Fixes saltstack#64249

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
3 participants