Feature #21358
closedCancelled future/recurring job invocations should not get the status "failed" but rather "cancelled"
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1503037
Description of problem:
When scheduling a job for execution in the future, it gets the status "queued". If you go to the job and press "Cancel job", the job gets status "failed" the task will contain a huge error output. This is not a good user experience.
Version-Release number of selected component (if applicable):
6.2.12
How reproducible:
Always
Steps to Reproduce:
1. Go to Hosts -> Job templates
2. Choose a Job template, e.g. "Run Command - SSH Default", and click "Run" at the right hand side
3. Enter a Search query, e.g "name = test.example.com"
4. Enter a command to execute, e.g. "whoami"
5. Click on "Schedule future execution" and enter a date in the future, e.g. an hour later
6. Click Submit
7. Go to Monitor -> Jobs
8. Notice that the new job has status "queued"
9. Click on the job name, in this case "Run whoami"
10. Click on "Cancel Job"
11. Click on "Job Task" and notice that "State: stopped" and "Result: error" and the long error message
12. Go back to Monitor -> Jobs and notice that the job status is now "failed"
Actual results:
Job status is "failed" with a huge error message in the task.
Expected results:
Job status should be "cancelled" and the error message should not clutter the job task.
Additional info:
It would be a much better user experience if the there is another status called "cancelled". This would allow users to separate tasks that have actually failed because of something not working properly and jobs that are cancelled manually.