-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
Description
We have a scheduler job that executes a formula with large amount of states. After update to 3006.5 we noticed that minions stop responding after some time. The test we did was to execute a file with large amount of states (example in setup) using the scheduler. After running the state minions stop responding and they leave defunct process. We tested this behavior on a vanilla (default) salt-master and salt-minion setup.
Setup
/srv/salt/test_state.sls
{% for i in range(1, 1024) %}
echo_random_string_{{ i }}:
cmd.run:
- name: echo "This is a random string number {{ i }}"
{% endfor %}
Command for creating the job:
salt 'minion1' schedule.add test_job function='state.sls' job_args="['test_state']" seconds=300
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service - Linode
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
After setting up the job and running following command:
salt 'minion1' schedule.run_job test_job
The minion stops responding leaving defunct process.
0:07 \_ [/opt/saltstack/] <defunct>
Expected behavior
The salt-minion should not leave a defunct process and should respond to salt commands.
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.5
Python Version:
Python: 3.10.13 (main, Nov 15 2023, 04:34:27) [GCC 11.2.0]
Dependency Versions:
cffi: 1.16.0
cherrypy: unknown
dateutil: 2.8.1
docker-py: 1.10.6
gitdb: 4.0.11
gitpython: 3.1.40
Jinja2: 3.1.2
libgit2: 1.3.0
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: 2.6.1
pycryptodome: 3.9.8
pygit2: 1.7.0
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.14.2
smmap: 5.0.1
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 20.04.5 focal
locale: utf-8
machine: x86_64
release: 5.4.0-155-generic
system: Linux
version: Ubuntu 20.04.5 focal