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-ssh requires the distro python package #61535

Open
1 of 6 tasks
TimidRobot opened this issue Jan 27, 2022 · 7 comments
Open
1 of 6 tasks

[BUG] salt-ssh requires the distro python package #61535

TimidRobot opened this issue Jan 27, 2022 · 7 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@TimidRobot
Copy link

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

  1. Provisioned a Debian 11 Bullseye VM on AWS using
  2. Attempt to use salt-ssh to configure it.
    sudo salt-ssh TARGET-HOST test.version
    
    TARGET-HOST:
        ----------
        retcode:
            1
        stderr:
            Connection to TARGET-HOST-IP closed.
        stdout:
    
  3. Follow Debugging salt-ssh - Salt SSH instructions to manually invoke salt-call on 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'
  4. Manually install distro on TARGET-HOST:
    sudo apt-get install python3-distro
    
  5. Confirm it works as expected:
    sudo salt-ssh TARGET-HOST test.version
    
    TARGET-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
@TimidRobot TimidRobot added Bug broken, incorrect, or confusing behavior needs-triage labels Jan 27, 2022
TimidRobot added a commit to creativecommons/sre-salt-prime that referenced this issue Jan 31, 2022
@frogunder
Copy link
Contributor

@TimidRobot Thank you for reporting this issue.

I am not able to replicate the issue and it seems to work fine for me when installing the official salt package from https://repo.saltproject.io/#debian

How did you install salt?

I also see that you mention that issue is on Debian 11 but in your salt version output it shows Debian 10.

Thanks.

@TimidRobot
Copy link
Author

TimidRobot commented Feb 2, 2022

@frogunder

  • master: Debian GNU/Linux 10 (buster)
    • deb https://repo.saltproject.io/py3/debian/10/amd64/3004 buster main
      • salt-common 3004+ds-1
      • salt-master 3004+ds-1
      • salt-minion 3004+ds-1
      • salt-ssh 3004+ds-1
  • minion: Debian GNU/Linux 11 (bullseye)
    • deb https://repo.saltproject.io/py3/debian/11/amd64/3004 bullseye main
      • salt-common 3004+ds-1
      • salt-minion 3004+ds-1

The Debian GNU/Linux 11 (bullseye) AMI (debian-11-amd64-20220121-894: ami-04dd0542609808c50) does not have python3-distro installed.

Did you try uninstalling python3-distro on the test minion (or removing it via pip if it was installed that way)?

@frogunder
Copy link
Contributor

@saltstack/team-ssh Anyone have time to take a look at this? Thanks.

@frogunder
Copy link
Contributor

@krionbsd This might be a packaging issue. Can you take a look?

@frogunder frogunder added Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged and removed needs-triage labels Feb 11, 2022
@frogunder frogunder added this to the Approved milestone Feb 11, 2022
@OrangeDog OrangeDog added Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Mar 14, 2022
@johnnybubonic
Copy link

johnnybubonic commented Jan 16, 2023

Confirming that this also occurs with an Alma 8.7 master on onedir 3005.1.4 with a target minion of Alma 9.1.

@HalfLife1
Copy link

still occurs:
master: ubuntu20.04 , 3005.1

target minion: Rocky Linux release 9.1 (Blue Onyx)

@trend-will-gerik
Copy link

This no longer appears to be an issue with version 3006. Can anyone confirm?

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 Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

7 participants