[BUG] salt-ssh requires the distro python package
Open
@krionbsd is already working on this.
Since Mar 14, 2022.
bug
pending-discussion
Salt-SSH
severity-medium
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
salt-ssh requires the distro python package.
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
- Provisioned a Debian 11 Bullseye VM on AWS using
- Cloud/AmazonEC2Image/Bullseye - Debian Wiki:
debian-11-amd64-20220121-894:ami-04dd0542609808c50
- Cloud/AmazonEC2Image/Bullseye - Debian Wiki:
- Attempt to use
salt-sshto configure it.sudo salt-ssh TARGET-HOST test.versionTARGET-HOST: ---------- retcode: 1 stderr: Connection to TARGET-HOST-IP closed. stdout: - Follow Debugging salt-ssh - Salt SSH instructions to manually invoke
salt-callon target host:Traceback (most recent call last): File "/var/tmp/.admin_62bf38_salt/salt-call", line 27, in <module> salt_call() File "/var/tmp/.admin_62bf38_salt/pyall/salt/scripts.py", line 426, in salt_call import salt.cli.call File "/var/tmp/.admin_62bf38_salt/pyall/salt/cli/call.py", line 3, in <module> import salt.cli.caller File "/var/tmp/.admin_62bf38_salt/pyall/salt/cli/caller.py", line 14, in <module> import salt.loader File "/var/tmp/.admin_62bf38_salt/pyall/salt/loader/__init__.py", line 14, in <module> import salt.config File "/var/tmp/.admin_62bf38_salt/pyall/salt/config/__init__.py", line 17, in <module> import salt.syspaths File "/var/tmp/.admin_62bf38_salt/pyall/salt/syspaths.py", line 22, in <module> import salt.utils.platform File "/var/tmp/.admin_62bf38_salt/pyall/salt/utils/platform.py", line 11, in <module> from distro import linux_distribution ModuleNotFoundError: No module named 'distro' - Manually install distro on TARGET-HOST:
sudo apt-get install python3-distro - Confirm it works as expected:
sudo salt-ssh TARGET-HOST test.versionTARGET-HOST: 3004
Expected behavior
salt-ssh should succeed without requiring packages on the target host (if this assumption is wrong, then the documentation should be updated to included dependencies)
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3004
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
Jinja2: 2.10
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.5.6
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.6.1
pygit2: Not Installed
Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10 buster
locale: UTF-8
machine: x86_64
release: 4.19.0-18-amd64
system: Linux
version: Debian GNU/Linux 10 buster
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.