[BUG] mongo_future_return not working as master_job_cache
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
I've setup the mongo_future returner as external job cache and that is working fine. However, I don't want to expose the database credentials to each minion (via pillar), so I tried to configure it as master job cache by adding
master_job_cache: mongo_future_return
to the master's configuration, together with the same MongoDB connection data that was already working when used as external job cache. In addition, I installed the python3-pymongo package on the Salt master.
When set up as a master job cache, even simple test.ping commands will not return and the master log contains a line like this:
2020-04-26 12:38:05,769 [salt.master :2199][ERROR ][3387] Failed to allocate a jid. The requested returner 'mongo_future_return' could not be loaded.
Setup
master_job_cache: mongo_future_return
mongo.db: salt
mongo.host: mongodb
mongo.indexes: true
mongo.password: S3cr3t
mongo.port: 27017
mongo.user: salt
Steps to Reproduce the behavior
- configure Salt master as shown above
- restart salt master
- run a salt command against a minion
Expected behavior
The salt ocmmand should succeed and job data should be returned to the mongo DB.
Versions Report
# salt --versions-report
Salt Version:
Salt: 2019.2.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.7.3 (default, Dec 20 2019, 18:57:59)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10.3
locale: UTF-8
machine: x86_64
release: 4.19.0-8-amd64
system: Linux
version: debian 10.3
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.
Research direction
Start by reproducing the failure with the shown master_job_cache and MongoDB settings, then trace how mongo_future_return is loaded for the master job cache compared with the external job cache. Done means salt commands such as test.ping complete successfully and job data is written to MongoDB without exposing credentials to minions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100