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.
Support for having cancelled remote execution jobs go into special "cancelled" state was added as a part of the attached BZ. What remains to be done is having this kind of behaviour for delayed/recurring jobs. Changing this BZ's title to reflect that.
Created redmine issue http://projects.theforeman.org/issues/21358 from this bug
Upstream bug assigned to ddolguik
Hello Team, I have a customer looking for the same feature. Do we have any timeline or Satellite version to share, when this would be included? Regards, Anand
Verified on Satellite 6.8 snap 1, the cancelled state is now assigned to cancelled jobs (one-time, delayed, recurring) and the state is communicated in jobs and rec. logics ui pages, in task details widget and is available in task search.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366