[DOCS] Improving returner docs
Description
The docs do a very bad job at explaining the difference between ext_job_cache, event_return, master_job_cache, --return and which returner modules support which contexts.
Suggested Fix Clarify the following:
- The difference between the master options (I don't currently understand this)
- How
--returnworks (does it ask the minion to send the data, and does this relate to the master options? which master option sets the argument's default value?) - How to tell if a module can be used in a given master option (it is unclear to me which exact functions this depends on)
- Which options should be on the masters and which should be on the minions
Location or format of documentation https://docs.saltproject.io/en/latest/ref/returners/index.html https://docs.saltproject.io/en/latest/topics/jobs/external_cache.html https://docs.saltproject.io/en/latest/ref/configuration/master.html
Additional context I am more than happy to write the documentation, but I need to know how the returner system works before that and if the links above are the correct place to add documentation to.
I just had to dig into the returner system, so I might have some answers for you.
Minion options:
returninstructs the minion to send job results to a list of external systems in addition to sending them to the master. This is the same thing--returndoes. Essentially, this sends copies that are otherwise not used inside Salt.
Master options:
- With
master_job_cache, minions will return the results as usual and the master will send those to an external system. It will look up job results from there instead of the disk. ext_job_cacheinstructs minions to return job results to an external system instead of the master by default. The master will look up job results from there instead of the disk.event_returninstructs the master to send all events to a list of external systems. You can filter which events are sent usingevent_return_whitelistandevent_return_blacklist(undocumented afaik). There are also several engines that do the same. I'm unsure which way of exporting events should be preferred.
Necessary functions per config option:
return
returner
master_job_cache
returnerprep_jidsave_loadget_load
ext_job_cache
returnerprep_jidsave_loadget_loadget_jidget_funget_jidsget_minions
event_return
event_return
Edit: TIL scheduled tasks do not respect return. You need to set schedule_returners for default task returners, which can be overridden per task.
I was planning on giving this another go soon-ish, this will really help. Thanks a lot!
Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.
Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.
If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.
Reopening — there is an open PR tracking a fix for this: #69564.
Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.