saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.13k stars 5.47k forks source link

[BUG]salt-ssh write file timeout #64880

Closed wywself closed 3 weeks ago

wywself commented 1 year ago

Description

Hi, I'm using the salt-ssh module to write a file on a minion. However, the salt master shows that the ssh process execution is very slow, leading to a timeout when trying to fetch the result using salt-api.

Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

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

Steps to Reproduce the behavior salt-ssh file.write

Expected behavior salt ssh no problem.

Screenshots image

Versions Report salt --versions-report Salt Version: Salt: 3002.6

Dependency Versions: cffi: 1.14.3 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: 4.0.7 gitpython: 3.1.23 Jinja2: 2.10.1 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.0 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.17 pycrypto: Not Installed pycryptodome: 3.9.8 pygit2: Not Installed Python: 3.7.10 (default, Apr 15 2021, 05:35:41) python-gnupg: 0.4.4 PyYAML: 5.3.1 PyZMQ: 18.0.1 smmap: 4.0.0 timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.1

System Versions: dist: alpine 3.12.7 locale: UTF-8 machine: x86_64 release: 3.10.0-1062.el7.x86_64 system: Linux version: Alpine Linux 3.12.7

salt-minion --versions-report Salt Version: Salt: 3002.6

Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: Not Installed docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.1 libgit2: Not Installed M2Crypto: 0.35.2 Mako: Not Installed msgpack: 0.6.2 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: Not Installed pycryptodome: Not Installed pygit2: Not Installed Python: 3.6.8 (default, Nov 16 2020, 16:55:22) python-gnupg: Not Installed PyYAML: 3.13 PyZMQ: 17.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.1.4

System Versions: dist: centos 7 Core locale: UTF-8 machine: x86_64 release: 3.10.0-1062.el7.x86_64 system: Linux version: CentOS Linux 7 Core

Additional context Add any other context about the problem here.

garethgreenaway commented 1 year ago

@wywself Thanks for the report, at this point we are no longer supporting the 3002.6 release of Salt. Please upgrade to a newer release and let us know if the problem still persists. Also, please include some additional information about the Salt setup and the commands you're running, eg. are you using the Salt API and Salt SSH together? Thanks!

wywself commented 1 year ago

@garethgreenaway Hi, I found the reason for the timeout. I run k8s on my minion, and there are many pods, which makes it take too long to obtain fqdn. I try to set enable_fqdn_grains to False in /etc/salt/minion, but it doesn't work. What else should I do? Thank you.

image

garethgreenaway commented 1 year ago

@wywself Thanks for the update. That setting should ensure that the FQDN related grains aren't generated, were you able to upgrade to a newer version of Salt? We're currently supporting 3005 for security fixes and 3006 for bug fixes.

Akm0d commented 3 weeks ago

@wywself Closing until confirmed this is an issue in a supported version of salt