[BUG] Minions data missing from MySQL job cache
@twangboy is already working on this.
Since Nov 16, 2021.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
The json output of list_job with local jobcache is different than a mysql jobcache.
Setup
Very basic setup with CentOS 8 Stream
- salt-3004
- mariadb-server-10.3.28
- platform-python-3.6.8
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (VMware ESXi 6.7)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
Steps to Reproduce the behavior
Just run jobs.list_job [ID] with local and with mysql output to see the difference.
This is the output with local jobcache
# salt-run jobs.list_job 20211116131018012776 --out=json
{
"jid": "20211116131018012776",
"Function": "test.ping",
"Arguments": [],
"Target": "*",
"Target-type": "glob",
"User": "root",
"Minions": [
"server-mgt01.REDACTED",
"server-tst01.REDACTED",
"server-tst02.REDACTED"
],
"StartTime": "2021, Nov 16 13:10:18.012776",
"Result": {
"server-tst01.REDACTED": {
"return": true,
"retcode": 0,
"success": true
},
"server-tst02.REDACTED": {
"return": true,
"retcode": 0,
"success": true
},
"server-mgt01.REDACTED": {
"return": true,
"retcode": 0,
"success": true
}
}
}
[INFO ] Runner completed: 20211116131204988971
This is the output with mysql jobcache
$ salt-run jobs.list_job 20211116114342060929 --out=json
{
"jid": "20211116114342060929",
"Function": "test.ping",
"Arguments": [],
"Target": "*",
"Target-type": "glob",
"User": "root",
"StartTime": "2021, Nov 16 11:43:42.060929",
"Result": {
"server-tst01.REDACTED": {
"cmd": "_return",
"id": "server-tst01.REDACTED",
"success": true,
"return": true,
"retcode": 0,
"jid": "20211116114342060929",
"fun": "test.ping",
"fun_args": [],
"_stamp": "2021-11-16T11:43:42.305608"
},
"server-tst02.REDACTED": {
"cmd": "_return",
"id": "server-tst02.REDACTED",
"success": true,
"return": true,
"retcode": 0,
"jid": "20211116114342060929",
"fun": "test.ping",
"fun_args": [],
"_stamp": "2021-11-16T11:43:42.365949"
},
"server-mgt01.REDACTED": {
"cmd": "_return",
"id": "server-mgt01.REDACTED",
"success": true,
"return": true,
"retcode": 0,
"jid": "20211116114342060929",
"fun": "test.ping",
"fun_args": [],
"_stamp": "2021-11-16T11:43:42.483357"
}
}
}
[INFO ] Runner completed: 20211116125620672471
While the MySQL one provides a lot more output in the Result section, it is completely missing the minions section.
Expected behavior
At least the sections in the json output should be the same. This breaks scripts and 3rd party software that depends on the json sections.
Screenshots
Console output already provided in the steps to reproduce behavior.
Versions Report
# salt --versions-report
Salt Version:
Salt: 3004
Dependency Versions:
cffi: 1.11.5
cherrypy: unknown
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: 1.4.6
pycparser: 2.14
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Oct 19 2021, 05:14:06)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 19.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: centos 8
locale: UTF-8
machine: x86_64
release: 4.18.0-348.el8.x86_64
system: Linux
version: CentOS Stream 8
Minion versions are the same. One is same centos 8 version as the master, the other is centos 7. The master is a minion as well.
Additional context
Discovered this while trying to get SaltGUI working on salt with MySQL jobcache. Figured it was a bug in SaltGUI but it turns out Salt gives 2 different kinds of results.
If it's of any use, here's the bugreport for SaltGUI: https://github.com/erwindon/SaltGUI/issues/399
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.