Scheduled state.sls of state file that does not exists returns success = True #35812
Labels
Bug
broken, incorrect, or confusing behavior
Core
relates to code central or existential to Salt
P4
Priority 4
severity-medium
3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description of Issue/Question
Since salt jobs executed via the salt scheduler do not send events back to the server, and I want to set up alerting when scheduled jobs fail, I am using a custom returner to generate a custom event that is handled by a custom reactor on the master which decided if an alert should be generated and does so.
One issue I am having is that the value of ret["success"] in the returner function of my returner is not reliable. The specific issue in this case is when the schedule pillar uses state.sls to execute a state file but the name of the state file is incorrect. While ret["return"][0] contains
"No matching sls found for 'bogus' in env 'dmz'"
ret["success"] is True.Setup
The incorrect schedule pillar is:
The mistake is that bogus.sls does not exist. The schedule should specify "dmz.bogus" in this case.
To make it easy to see the data passed in to the returner, I am using debug_returner.py (instead of the returner that generates my custom event):
Steps to Reproduce Issue
Set
log_level_logfile: error
in the minion config and tail the log to see the output when the bogus-scheduled-job executes.Note
success: True
andVersions Report
The text was updated successfully, but these errors were encountered: