You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ salt-ssh
Traceback (most recent call last):
File "/home/gray/salt/venv/bin/salt-ssh", line 8, in <module>
sys.exit(salt_ssh())
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/scripts.py", line 450, in salt_ssh
import salt.cli.ssh
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/cli/ssh.py", line 5, in <module>
import salt.client.ssh
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/client/__init__.py", line 30, in <module>
import salt.config
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/config/__init__.py", line 99, in <module>
_DFLT_IPC_WBUFFER = _gather_buffer_space() * .5
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/config/__init__.py", line 88, in _gather_buffer_space
import salt.grains.core
File "/home/gray/salt/venv/lib/python3.8/site-packages/salt/grains/core.py", line 40, in <module>
from platform import _supported_dists
ImportError: cannot import name '_supported_dists' from 'platform' (/usr/lib64/python3.8/platform.py)
Versions Report
N/A
The text was updated successfully, but these errors were encountered:
As a workaround you can patch salt/grains/core.py:
diff --git "a/salt/grains/core.py" "b/salt/grains/core.py"
index a3be0b8a1c..ff548923f4 100644
--- "a/salt/grains/core.py"+++ "b/salt/grains/core.py"@@ -35,12 +35,6 @@ except ImportError:
__proxyenabled__ = ['*']
__FQDN__ = None
-# Extend the default list of supported distros. This will be used for the-# /etc/DISTRO-release checking that is part of linux_distribution()-from platform import _supported_dists-_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',- 'slamd64', 'ovs', 'system', 'mint', 'oracle', 'void')-
# linux_distribution deprecated in py3.7
try:
from platform import linux_distribution as _deprecated_linux_distribution
@@ -1939,7 +1933,7 @@ def os_data():
)
(osname, osrelease, oscodename) = \
[x.strip('"').strip("'") for x in
- linux_distribution(supported_dists=_supported_dists)]+ linux_distribution()]
# Try to assign these three names based on the lsb info, they tend to
# be more accurate than what python gets from /etc/DISTRO-release.
# It's worth noting that Ubuntu has patched their Python distribution
Then you should be able to start salt-ssh, salt-call without the exception but you might run into other issues.
Description of Issue
salt-ssh failed to run after the python had been updated to 3.8
Setup
salt-ssh was in the normal condition and worked fine before python upgrade have been done
I've tried the following workaround:
Steps to Reproduce Issue
Versions Report
N/A
The text was updated successfully, but these errors were encountered: