[BUG] On Windows an engine is started multiple times when multiple masters are defined
Open
Nobody has claimed this yet.
bug
severity-medium
Windows
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Running salt-minion with multiples masters causes equal amount of the same engine to be started.
Setup
Connect a Windows minion to two salt-masters and enable the test engine:
master:
- master1
- master2
engines:
- test
log_level: debug
log_level_logfile: debug
Steps to Reproduce the behavior
Two engines are started instead of one:
PS C:\salt\var\log\salt> Select-String "Starting Engine salt.engines.Engine" .\minion
minion:3866:2021-06-10 07:35:18,900 [salt.engines :65 ][INFO ][6740] Starting Engine
salt.engines.Engine(salt.loaded.ext.engines.test)
minion:3889:2021-06-10 07:35:19,618 [salt.engines :65 ][INFO ][6740] Starting Engine
salt.engines.Engine(salt.loaded.ext.engines.test)
PS C:\salt\var\log\salt> Select-String "Creating minion process manager" .\minion
minion:3851:2021-06-10 07:35:18,591 [salt.minion :1272][INFO ][6740] Creating minion process manager
minion:3862:2021-06-10 07:35:18,863 [salt.minion :1272][INFO ][6740] Creating minion process manager
Expected behavior
Expected to be only running 1 test engine.
Versions Report
salt-call.bat --versions-report
PS C:\salt> .\salt-call.bat --versions-report
Salt Version:
Salt: 3002.6
Dependency Versions:
cffi: 1.12.2
cherrypy: 17.4.1
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.10
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack: 1.0.0
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.19
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
python-gnupg: 0.4.4
PyYAML: 5.3.1
PyZMQ: 18.0.1
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 10
system: Windows
version: 10 10.0.19041 SP0
Additional context
The main problem here is that there's no way to tell which engine started first. For example events are duplicated (in our case event.fire_master events).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.