-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returner configuration override options don't work for scheduled jobs (schedule module) #33868
Comments
I added a bit of logging to
Meanwhile, with the scheduled job:
So, it looks like the Edit: actually, looks like none of the
|
I think I'm getting closer to the root of the problem.
This has no presentation elsewhere in the codebase:
|
Yep, fixed by:
Will submit a PR. |
|
…ation attributes 'return_config' and 'return_kwargs'. They are specified as 'return_config' and 'return_kwargs' in the documentation, and those are the member names used elsewhere in the code base. However, this code previously referenced 'returner_kwargs' and 'returner_config', so returners from scheduled jobs were not appropriately called in situations in which configuration parameters to override default minion config needed to be provided to the schedule module. Resolves issue saltstack#33868 (saltstack#33868).
@abalashov thanks for the PR! Its always great to see a fix for an issue 👍 We will close this once the PR has been merged. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Description of Issue/Question
The SMTP returner works for a generic
cmd.run
invocation, but not for a scheduled job that wraps the same.Setup
Just a stock master and a minion, no SLS files, pillars or environmental complexities. Basically just using Salt for remote mass-execution at this point.
Steps to Reproduce Issue
This works:
salt 'my-minion' cmd.run 'iostat' --return smtp --return_kwargs '{"to": "me@me.com", "from": "noc@me.com", "host": "10.150.20.2", "port": 25, "subject": "iostat output on my-minion"}'
It results in:
However, when I do the same using a one-time scheduled job ...
salt 'my-minion' schedule.add run_iostat function='cmd.run' job_args="['iostat']" returner=smtp return_kwargs='{"to": "me@me.com", "from": "noc@me.com", "host": "10.150.20.2", "subject": "iostat"}' once='2016-06-08T14:37:10'
It runs the job, and the output can be accessed, e.g. via
salt-run jobs.lookup_jid
, but blows up with ansmtplib
exception, per the minion log:I should add that I ran a
tcpdump
on the SMTP server and saw no attempt to connect to10.150.20.2
from the minion or the master in the second case.Versions Report
Master:
Minion:
The text was updated successfully, but these errors were encountered: