Open jchatin opened 1 month ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
updated salt to 3007.0, same issue
Also just noticed that running a runner module from the salt master in async has the same behavior
From salt master
Description salt-master defunct process after calling a runner function using the API with pepper cli #63838
Setup
Dockerfile
``` FROM debian:bullseye RUN apt-get update && apt-get upgrade -y && \ apt-get install -y wget gnupg2 RUN wget -O - https://repo.saltproject.io/salt/py3/debian/11/amd64/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub | apt-key add - && \ printf 'deb https://repo.saltproject.io/salt/py3/debian/11/amd64/3006 bullseye main' > /etc/apt/sources.list.d/saltstack.list && \ apt-get update && \ apt-get install -y salt-master salt-api salt-ssh salt-cloud python3-pip git iproute2 && \ EXPOSE 4505 4506 8000 ADD run.sh /usr/local/bin/run.sh #ENV LOG_LEVEL debug #ENV LOG_LEVEL info RUN chmod +x "/usr/local/bin/run.sh" RUN useradd -p YourOwnPasswordHash testapi CMD [ "/usr/local/bin/run.sh" ] ```/etc/salt/master.d/testapi.conf
``` rest_cherrypy: port: 80 host: 0.0.0.0 disable_ssl: true log_access_file: /var/log/salt/cherrypy_pap.access log_error_file: /var/log/salt/cherrypy_pap.error external_auth: pam: testapi: - .* - '@wheel' - '@runner' - '@jobs' ```Steps to Reproduce the behavior install salt-pepper module and cli $ pip install salt-pepper
API call to salt master, to list jobs using the runner client $ pepper --client=runner -t 10 jobs.list_jobs
On salt master a defunct process salt-master is running. A new APi call will fork a new defunct.
Expected behavior No defunct process should run after runner jobs.list_jobs return
Screenshots
ps -ef --forest
``` root 4463 1 0 17:00 ? 00:00:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 6b8a025fd09e5c5f4dccbea907629650c97b25ed7ac9f2354f7d99945f27c651 -address /run/containerd/containerd.sock root 4483 4463 0 17:00 ? 00:00:04 \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master --log-level=error MainProcess root 4512 4483 0 17:00 ? 00:00:01 | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-api --log-level=error MainProcess root 4544 4512 1 17:00 ? 00:00:44 | | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-api --log-level=error RunNetapi(salt.loaded.int.netapi.rest_cherrypy) root 4673 4483 0 17:00 ? 00:00:00 | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master --log-level=error PubServerChannel._publish_daemon root 4675 4483 0 17:00 ? 00:00:00 | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master --log-level=error EventPublisher root 4678 4483 0 17:00 ? 00:00:31 | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master --log-level=error Maintenance root 4682 4483 5 17:00 ? 00:02:59 | \_ /opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master --log-level=error ConnectedCache root 19597 4682 1 17:59 ? 00:00:00 | | \_ [/opt/saltstack/]master logfile
``` 2024-05-21 15:29:45,437 [salt.config :2017][DEBUG ][9363] Reading configuration from /etc/salt/master 2024-05-21 15:29:45,566 [salt.config :2180][DEBUG ][9363] Including configuration from '/etc/salt/master.d/testapi.conf' 2024-05-21 15:29:45,566 [salt.config :2017][DEBUG ][9363] Reading configuration from /etc/salt/master.d/testapi.conf 2024-05-21 15:29:45,574 [salt.loader :1073][DEBUG ][9363] Grains refresh requested. Refreshing grains. 2024-05-21 15:29:45,574 [salt.config :2017][DEBUG ][9363] Reading configuration from /etc/salt/master 2024-05-21 15:29:45,696 [salt.config :2180][DEBUG ][9363] Including configuration from '/etc/salt/master.d/testapi.conf' 2024-05-21 15:29:45,696 [salt.config :2017][DEBUG ][9363] Reading configuration from /etc/salt/master.d/testapi.conf 2024-05-21 15:29:45,728 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'core' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,730 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'disks' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,731 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'extra' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,734 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'lvm' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,735 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'mdadm' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,738 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'minion_process' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,740 [salt.loader.lazy :977 ][DEBUG ][9363] The functions from module 'opts' are being loaded by dir() on the loaded module 2024-05-21 15:29:45,744 [salt.loader.lazy :876 ][DEBUG ][9363] Override __utils__:Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3006.4 Python Version: Python: 3.10.13 (main, Oct 4 2023, 21:54:22) [GCC 11.2.0] Dependency Versions: cffi: 1.16.0 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: 1.7.1 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: 1.13.3 python-gnupg: 0.4.8 PyYAML: 6.0.1 PyZMQ: 23.2.0 relenv: 0.13.12 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 5.10.0-28-cloud-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```Additional context