Bug 1503037 - [RFE] Cancelled future/recurring job invocations should not get the status "failed" but rather "cancelled"
Summary: [RFE] Cancelled future/recurring job invocations should not get the status "f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.12
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-17 09:04 UTC by Ture Karlsson
Modified: 2020-10-27 12:57 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-foreman_remote_execution-3.2.0,tfm-rubygem-dynflow-1.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:57:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21358 0 Normal Closed Cancelled future/recurring job invocations should not get the status "failed" but rather "cancelled" 2020-10-28 17:13:47 UTC
Red Hat Bugzilla 1431107 0 medium CLOSED it is hard (or there is no way at all) to cancel pending tasks from old remote execution job 2021-06-10 12:02:16 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 12:57:47 UTC

Internal Links: 1431107

Description Ture Karlsson 2017-10-17 09:04:10 UTC
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.

Comment 1 Adam Ruzicka 2017-10-17 12:07:43 UTC
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.

Comment 2 Adam Ruzicka 2017-10-17 12:08:26 UTC
Created redmine issue http://projects.theforeman.org/issues/21358 from this bug

Comment 3 Satellite Program 2018-01-26 23:14:37 UTC
Upstream bug assigned to ddolguik

Comment 4 Satellite Program 2018-01-26 23:14:41 UTC
Upstream bug assigned to ddolguik

Comment 5 Anand Agrawal 2019-09-10 14:50:04 UTC
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

Comment 8 Peter Ondrejka 2020-05-21 13:50:22 UTC
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.

Comment 11 errata-xmlrpc 2020-10-27 12:57:21 UTC
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


Note You need to log in before you can comment on or make changes to this bug.