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] salt-pip doesn't install second salt extension #65433

Closed
2 of 9 tasks
ggiesen opened this issue Oct 19, 2023 · 3 comments
Closed
2 of 9 tasks

[BUG] salt-pip doesn't install second salt extension #65433

ggiesen opened this issue Oct 19, 2023 · 3 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Sulfur v3006.3

Comments

@ggiesen
Copy link
Contributor

ggiesen commented Oct 19, 2023

Description
Installing more than one Salt extension in Salt 3006 appears to succeed but the files aren't actually installed in /opt/saltstack/salt/extras-3.10/saltext

Setup

# Initialize the salt environment
mkdir vagrant-salt-saltext && cd vagrant-salt-saltext && vagrant init almalinux/9 && vagrant up && vagrant ssh

[vagrant@localhost ~]$ sudo rpm --import https://repo.saltproject.io/salt/py3/redhat/9/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub
[vagrant@localhost ~]$ curl -fsSL https://repo.saltproject.io/salt/py3/redhat/9/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo
[vagrant@localhost ~]$ sudo yum install -y salt-master salt-cloud

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

  • 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
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
Install the first extension:

[vagrant@localhost ~]$ sudo salt-pip install saltext.vmware
Collecting saltext.vmware
  Downloading saltext.vmware-23.6.29.0rc1-py2.py3-none-any.whl (397 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 397.7/397.7 kB 9.9 MB/s eta 0:00:00
...
Successfully built pyvmomi
Installing collected packages: pyvmomi, saltext.vmware
Successfully installed pyvmomi-7.0.3 saltext.vmware-23.6.29.0rc1

[vagrant@localhost ~]$ sudo salt-run test.arg foo
args:
    - foo
kwargs:
    ----------
The extension shows as installed in salt --versions-report:
[vagrant@localhost ~]$ salt --versions-report
Salt Version:
           Salt: 3006.3

Python Version:
         Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
           cffi: 1.14.6
       cherrypy: unknown
       dateutil: 2.8.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 3.1.2
        libgit2: Not Installed
   looseversion: 1.0.2
       M2Crypto: Not Installed
           Mako: Not Installed
        msgpack: 1.0.2
   msgpack-pure: Not Installed
   mysql-python: Not Installed
      packaging: 22.0
      pycparser: 2.21
       pycrypto: Not Installed
   pycryptodome: 3.9.8
         pygit2: Not Installed
   python-gnupg: 0.4.8
         PyYAML: 6.0.1
          PyZMQ: 23.2.0
         relenv: 0.13.10
          smmap: Not Installed
        timelib: 0.2.4
        Tornado: 4.5.3
            ZMQ: 4.3.4

Salt Extensions:
 saltext.vmware: 23.6.29.0rc1

System Versions:
           dist: almalinux 9.1 Lime Lynx
         locale: utf-8
        machine: x86_64
        release: 5.14.0-162.6.1.el9_1.x86_64
         system: Linux
        version: AlmaLinux 9.1 Lime Lynx

A directory is created for the extension:

[vagrant@localhost ~]$ ls -alh /opt/saltstack/salt/extras-3.10/saltext
total 0
drwxr-xr-x.  3 root root  20 Oct 19 21:26 .
drwxr-xr-x.  7 root root 125 Oct 19 21:26 ..
drwxr-xr-x. 10 root root 179 Oct 19 21:26 vmware

Now install the second extension:

[vagrant@localhost ~]$ sudo salt-pip install saltext.bitwarden
Collecting saltext.bitwarden
  Downloading saltext.bitwarden-0.0.1b15-py2.py3-none-any.whl (32 kB)
Requirement already satisfied: requests in /opt/saltstack/salt/lib/python3.10/site-packages (from saltext.bitwarden) (2.31.0)
Collecting pyhumps
  Downloading pyhumps-3.8.0-py3-none-any.whl (6.1 kB)
Collecting validators>=0.22.0
  Downloading validators-0.22.0-py3-none-any.whl (26 kB)
...
Installing collected packages: pyhumps, validators, saltext.bitwarden
Successfully installed pyhumps-3.8.0 saltext.bitwarden-0.0.1b15 validators-0.22.0
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
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

[notice] A new release of pip available: 22.3.1 -> 23.3
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

[vagrant@localhost ~]$ sudo salt-run test.arg foo
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
[ERROR   ] Error processing Salt Extension saltext.bitwarden(version: 0.0.1b15): No module named 'saltext.bitwarden'
args:
    - foo
kwargs:
    ----------
Both extensions show as installed in salt --versions-report:
[vagrant@localhost ~]$ salt --versions-report
Salt Version:
              Salt: 3006.3

Python Version:
            Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
              cffi: 1.14.6
          cherrypy: unknown
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 6.0.1
             PyZMQ: 23.2.0
            relenv: 0.13.10
             smmap: Not Installed
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

Salt Extensions:
 saltext.bitwarden: 0.0.1b15
    saltext.vmware: 23.6.29.0rc1

System Versions:
              dist: almalinux 9.1 Lime Lynx
            locale: utf-8
           machine: x86_64
           release: 5.14.0-162.6.1.el9_1.x86_64
            system: Linux
           version: AlmaLinux 9.1 Lime Lynx

No directory is created for the extension:

[vagrant@localhost ~]$ ls -alh /opt/saltstack/salt/extras-3.10/saltext
total 4.0K
drwxr-xr-x.  3 root root   20 Oct 19 21:26 .
drwxr-xr-x. 12 root root 4.0K Oct 19 21:37 ..
drwxr-xr-x. 10 root root  179 Oct 19 21:26 vmware

Now try reversing the order of installation:

vagrant destroy -f && vagrant up && vagrant ssh

[vagrant@localhost ~]$ sudo rpm --import https://repo.saltproject.io/salt/py3/redhat/9/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub
[vagrant@localhost ~]$ curl -fsSL https://repo.saltproject.io/salt/py3/redhat/9/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo
[vagrant@localhost ~]$ sudo yum install -y salt-master salt-cloud

Install the first extension:

vagrant@localhost ~]$ sudo salt-pip install saltext.bitwarden
Collecting saltext.bitwarden
  Downloading saltext.bitwarden-0.0.1b15-py2.py3-none-any.whl (32 kB)
Requirement already satisfied: requests in /opt/saltstack/salt/lib/python3.10/site-packages (from saltext.bitwarden) (2.31.0)
Collecting pyhumps
  Downloading pyhumps-3.8.0-py3-none-any.whl (6.1 kB)
Collecting validators>=0.22.0
  Downloading validators-0.22.0-py3-none-any.whl (26 kB)
...
Installing collected packages: pyhumps, validators, saltext.bitwarden
Successfully installed pyhumps-3.8.0 saltext.bitwarden-0.0.1b15 validators-0.22.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

[notice] A new release of pip available: 22.3.1 -> 23.3
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

[vagrant@localhost ~]$ sudo salt-run test.arg foo
args:
    - foo
kwargs:
    ----------
The extension shows as installed in salt --versions-report:
Salt Version:
              Salt: 3006.3

Python Version:
            Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
              cffi: 1.14.6
          cherrypy: unknown
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 6.0.1
             PyZMQ: 23.2.0
            relenv: 0.13.10
             smmap: Not Installed
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

Salt Extensions:
 saltext.bitwarden: 0.0.1b15

System Versions:
              dist: almalinux 9.1 Lime Lynx
            locale: utf-8
           machine: x86_64
           release: 5.14.0-162.6.1.el9_1.x86_64
            system: Linux
           version: AlmaLinux 9.1 Lime Lynx

A directory is created for the extension:

[vagrant@localhost ~]$ ls -alh /opt/saltstack/salt/extras-3.10/saltext
total 0
drwxr-xr-x. 3 root root  23 Oct 19 22:07 .
drwxr-xr-x. 8 root root 162 Oct 19 22:07 ..
drwxr-xr-x. 8 root root 147 Oct 19 22:07 bitwarden

Now install the second extension:

[vagrant@localhost ~]$ sudo salt-pip install saltext.vmware
Collecting saltext.vmware
  Downloading saltext.vmware-23.6.29.0rc1-py2.py3-none-any.whl (397 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 397.7/397.7 kB 11.7 MB/s eta 0:00:00
...
Successfully built pyvmomi
Installing collected packages: pyvmomi, saltext.vmware
Successfully installed pyvmomi-7.0.3 saltext.vmware-23.6.29.0rc1
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
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

[notice] A new release of pip available: 22.3.1 -> 23.3
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

[vagrant@localhost ~]$ sudo salt-run test.arg foo
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
[ERROR   ] Error processing Salt Extension saltext.vmware(version: 23.6.29.0rc1): No module named 'saltext.vmware'
args:
    - foo
kwargs:
    ----------
Both extensions show as installed in salt --versions-report:
Salt Version:
              Salt: 3006.3

Python Version:
            Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
              cffi: 1.14.6
          cherrypy: unknown
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 6.0.1
             PyZMQ: 23.2.0
            relenv: 0.13.10
             smmap: Not Installed
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

Salt Extensions:
 saltext.bitwarden: 0.0.1b15
    saltext.vmware: 23.6.29.0rc1

System Versions:
              dist: almalinux 9.1 Lime Lynx
            locale: utf-8
           machine: x86_64
           release: 5.14.0-162.6.1.el9_1.x86_64
            system: Linux
           version: AlmaLinux 9.1 Lime Lynx

No directory is created for the extension:

[vagrant@localhost ~]$ ls -alh /opt/saltstack/salt/extras-3.10/saltext
total 4.0K
drwxr-xr-x.  3 root root   23 Oct 19 22:07 .
drwxr-xr-x. 12 root root 4.0K Oct 19 22:10 ..
drwxr-xr-x.  8 root root  147 Oct 19 22:07 bitwarden

Now try installing both extensions in one transaction:

vagrant destroy -f && vagrant up && vagrant ssh

[vagrant@localhost ~]$ sudo rpm --import https://repo.saltproject.io/salt/py3/redhat/9/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub
[vagrant@localhost ~]$ curl -fsSL https://repo.saltproject.io/salt/py3/redhat/9/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo
[vagrant@localhost ~]$ sudo yum install -y salt-master salt-cloud

Install the extensions:

[vagrant@localhost ~]$ sudo salt-pip install saltext.vmware saltext.bitwarden
Collecting saltext.vmware
  Downloading saltext.vmware-23.6.29.0rc1-py2.py3-none-any.whl (397 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 397.7/397.7 kB 9.3 MB/s eta 0:00:00
Collecting saltext.bitwarden
  Downloading saltext.bitwarden-0.0.1b15-py2.py3-none-any.whl (32 kB)
Requirement already satisfied: jinja2>=3.1.0 in /opt/saltstack/salt/lib/python3.10/site-packages (from saltext.vmware) (3.1.2)
Collecting pyvmomi==7.0.3
  Downloading pyvmomi-7.0.3.tar.gz (592 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 592.3/592.3 kB 71.4 MB/s eta 0:00:00
...
Successfully built pyvmomi
Installing collected packages: pyhumps, validators, pyvmomi, saltext.vmware, saltext.bitwarden
Successfully installed pyhumps-3.8.0 pyvmomi-7.0.3 saltext.bitwarden-0.0.1b15 saltext.vmware-23.6.29.0rc1 validators-0.22.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

[notice] A new release of pip available: 22.3.1 -> 23.3
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

[vagrant@localhost ~]$ sudo salt-run test.arg foo
args:
    - foo
kwargs:
    ----------
Both extensions show as installed in salt --versions-report:
Salt Version:
              Salt: 3006.3

Python Version:
            Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
              cffi: 1.14.6
          cherrypy: unknown
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 6.0.1
             PyZMQ: 23.2.0
            relenv: 0.13.10
             smmap: Not Installed
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

Salt Extensions:
 saltext.bitwarden: 0.0.1b15
    saltext.vmware: 23.6.29.0rc1

System Versions:
              dist: almalinux 9.1 Lime Lynx
            locale: utf-8
           machine: x86_64
           release: 5.14.0-162.6.1.el9_1.x86_64
            system: Linux
           version: AlmaLinux 9.1 Lime Lynx

Expected behavior
Both extensions are installed and function when not installed in the same transaction

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
              Salt: 3006.3

Python Version:
            Python: 3.10.13 (main, Sep  6 2023, 02:11:27) [GCC 11.2.0]

Dependency Versions:
              cffi: 1.14.6
          cherrypy: unknown
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.2
           libgit2: Not Installed
      looseversion: 1.0.2
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.2
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         packaging: 22.0
         pycparser: 2.21
          pycrypto: Not Installed
      pycryptodome: 3.9.8
            pygit2: Not Installed
      python-gnupg: 0.4.8
            PyYAML: 6.0.1
             PyZMQ: 23.2.0
            relenv: 0.13.10
             smmap: Not Installed
           timelib: 0.2.4
           Tornado: 4.5.3
               ZMQ: 4.3.4

Salt Extensions:
 saltext.bitwarden: 0.0.1b15
    saltext.vmware: 23.6.29.0rc1

System Versions:
              dist: almalinux 9.1 Lime Lynx
            locale: utf-8
           machine: x86_64
           release: 5.14.0-162.6.1.el9_1.x86_64
            system: Linux
           version: AlmaLinux 9.1 Lime Lynx

Additional context

Same issue as reported here: #64662 (comment)

@ggiesen ggiesen added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 19, 2023
@dwoz dwoz self-assigned this Nov 9, 2023
@max-arnold
Copy link
Contributor

I can confirm that. Encountered this with my own extensions and initially thought that I packaged them incorrectly.

But it looks like the shared saltext namespace (folder) somehow blocks the second install. Reproduced it even with the official extensions:

salt-pip install saltext.vmware
salt-pip install saltext.azurerm
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
WARNING: Target directory /opt/saltstack/salt/extras-3.10/saltext already exists. Specify --upgrade to force replacement.
salt-call test.ping
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
[ERROR   ] Error processing Salt Extension saltext.azurerm(version: 4.0.1): No module named 'saltext.azurerm'
local:
    True
ls /opt/saltstack/salt/extras-3.10/saltext
vmware

@max-arnold
Copy link
Contributor

Upstream issue: pypa/pip#10110

@nicholasmhughes
Copy link
Collaborator

This issue is particular to salt-pip and it's use of target directory specification as noted above. Posting a workaround for use until this is resolved:

SLS parameter:

extensions:
  pip.installed:
    - names:
      - saltext.prometheus
      - saltext.vmware
    - bin_env: /opt/saltstack/salt/bin/pip

Command line:

/opt/saltstack/salt/bin/pip install saltext.prometheus saltext.vmware

Use of either method will force Salt to use the native pip command for the environment without target directory specification. Extension code will be installed to /opt/saltstack/salt/lib/python3.10/site-packages/saltext/ instead of /opt/saltstack/salt/extras-3.10/saltext/

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 Sulfur v3006.3
Projects
None yet
Development

No branches or pull requests

6 participants