Hello,
Is it possible to report some sort of status or progress for a long running minion job? Basically I have a small API running on the salt-master server. One of the functions of this api is to upload a python script to a salt-minion and then execute that script. It does this by creating an async salt job, and periodically checking if it is finished yet.
The problem is that sometimes this script can take 30 minutes to an hour to complete, but we have no idea how far along it is without logging directly into the minion to check. We do periodically print out the status of the script to a log file on the minion. Once the script finishes, salt will return the results we expect so we at least know it's finished.
Does anyone have an idea on how to report some sort of progress while the script is running? I'd even be happy with salt returning the stdout of the script every time it checks for a result, but I don't think that is possible at the moment.
My current idea is to just use cmd.run 'tail -n 5 /root/scriptlog.log' and returning that to our web UI that triggers everything, but it seems like there should be an easier way to do it.
Thanks,