SaltGUI: Running salt with a MySQL backend will break SaltGui jobs display

Describe the bug Running salt with a MySQL backend will break SaltGui jobs display. the jobs show up perfectly fine on the commandline.

To Reproduce Steps to reproduce the behaviour: Configure your salt-master to use MySQL as a job cache. make sure to create the proper tables (see salt documentation). Run a few jobs.

Expected behaviour SaltGUI giving the same output as salt-run jobs.lookup_jid JOB-ID

Screenshots image

Additional context I’ve been struggling with redis as well so it might be a generic backend thing and not just a problem with mysql.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

ok, we’ll keep that one. The code on the branch has already been updated with the new design. I still have to do more testing since, according to the original code, there were also exceptions for WHEEL and/or RUNNER jobs.

recreated the issue by removing the “Minions” part from a regular answer: afbeelding

In this case the missing “Minions” clause gives the funny result. I’ll try to update SaltGUI to show less confusing results. But without the minions-list, it is not possible to know how many results are expected. previously, the number of “no responses” was based on the difference between the number of Minions-keys and the number of Result-keys.

Feel free to ask support for the “Minions” information block in the Salt issues list: https://github.com/saltstack/salt/issues. It might be a missing feature or it may just be a simple bug.

I’ll change SaltGUI now to handle both situations.

Showing a negative number of responses is always bad! It will take a few days before I can set-up the required system to reproduce this. Instead, can you just steal the JSON response that was returned by the jobs.list_job call and send it over?

FYI: Displaying the job information requires 2 api-calls: jobs.list_job for the details and jobs.active to see whether it is still running. (and every one minute, “stats” is called by the application to detect session end).