Bug 1201660 - [RFE]: bulk actions on tasks
Summary: [RFE]: bulk actions on tasks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Usability
Version: 6.0.8
Hardware: All
OS: Linux
medium
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Tazim Kolhar
URL:
Whiteboard:
: 1231220 (view as bug list)
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker 1225497
TreeView+ depends on / blocked
 
Reported: 2015-03-13 08:42 UTC by Pavel Moravec
Modified: 2021-08-30 13:57 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 16:02:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-4784 0 None None None 2021-08-30 13:57:57 UTC
Red Hat Knowledge Base (Solution) 1547743 0 None None None Never

Description Pavel Moravec 2015-03-13 08:42:30 UTC
Description of problem:
There are several use cases when it is required to apply some bulk action to [all|pending] tasks in foreman. E.g. to resume or cancel them.

Currently, no such "one click button" exists and one has to resume or cancel all such tasks one by one.

It is requested to have a bulk action to apply given action on all selected tasks (i.e. on all tasks that a filter found).


Version-Release number of selected component (if applicable):
foreman-1.6.0.53-1


How reproducible:
100%


Steps to Reproduce:
1. Try to apply an action to all/selected tasks in one bulk.


Actual results:
No way doing so.


Expected results:
Have ability of doing so.


Additional info:

Comment 2 Mike McCune 2015-03-16 04:16:33 UTC
We should limit it to Bulk Resume.  Bulk "Force Quit" could have disastrous results for certain tasks that should have their root cause investigated before cancelling.

Comment 6 Tazim Kolhar 2015-07-17 07:34:55 UTC
I also did not face any issue in UI for snap13

# rpm -qa| grep foreman
foreman-compute-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.17-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el6_6sat.noarch
foreman-debug-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.18-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-postgresql-1.7.2.32-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch
foreman-gce-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
foreman-libvirt-1.7.2.32-1.el6_6sat.noarch
foreman-ovirt-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.15.4-1.el6_6sat.noarch
foreman-proxy-1.7.2.5-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-vmware-1.7.2.32-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.2.1-1.el6_6sat.noarch

steps:
1. Try to apply an action to all/selected tasks in one bulk.

Comment 7 Mike McCune 2015-07-17 21:07:54 UTC
There is nothing in the UI for this, it is in hammer only.

Comment 11 Tom McKay 2015-07-21 17:49:54 UTC
The 'hammer task list' command may be used to get a list of tasks, with results refined through the --search option.

$ hammer task list --help
Usage:
    hammer task list [OPTIONS]

Options:
 --by BY                       Field to sort the results on
 --order ORDER                 Sort field and order, eg. 'name DESC'
 --page PAGE                   Page number, starting at 1
 --per-page PER_PAGE           Number of results per page to return
 --search SEARCH               Search string
 -h, --help                    print help


$ hammer task list --search paused --per-page 2
-------------------------------------|------|-------------------|---------------------|----------|--------|---------|-------------------|------------
ID                                   | NAME | OWNER             | STARTED AT          | ENDED AT | STATE  | RESULT  | TASK ACTION       | TASK ERRORS
-------------------------------------|------|-------------------|---------------------|----------|--------|---------|-------------------|------------
8ab75c2e-5811-4a21-ad21-ae98229eee92 |      | foreman_api_admin | 2015/07/16 11:42:21 |          | paused | pending | Metadata generate |            
97db1728-9f0f-43ad-8d03-93d3aaf50005 |      | foreman_api_admin | 2015/07/16 11:42:21 |          | paused | pending | Metadata generate |            
-------------------------------------|------|-------------------|---------------------|----------|--------|---------|-------------------|------------


The 'hammer task resume' may be used to bulk resume all tasks in a state of paused with an error result. Additionally, tasks matching --search option may be resumed, or specific tasks with the --task-ids.

$ hammer task resume --help
Usage:
    hammer task resume [OPTIONS]

Options:
 --search SEARCH               Resume tasks matching search string
 --task-ids TASK_IDS           Resume specific tasks by id
                               Comma separated list of values.
 --tasks TASK_NAMES            Comma separated list of values.
 -h, --help                    print help


$ hammer task resume --task-ids 97db1728-9f0f-43ad-8d03-93d3aaf50005
Total tasks found paused in error state: 1
Total tasks resumed:                     1
Resumed tasks:                           
 1) Task identifier: 97db1728-9f0f-43ad-8d03-93d3aaf50005
    Task action:     Metadata generate
    Task errors:
Total tasks failed to resume:            0
Failed tasks:                            

Total tasks skipped:                     0
Skipped tasks:

Comment 12 Tazim Kolhar 2015-07-24 06:51:50 UTC
*** Bug 1231220 has been marked as a duplicate of this bug. ***

Comment 13 Corey Welton 2015-07-24 16:52:48 UTC
Add'l test results

[root@ibm-x3250m4-07 ~]# hammer -u admin -p changeme task resume
Total tasks found paused in error state: 2
Total tasks resumed:                     2
Resumed tasks:                           
 1) Task identifier: 864557b5-d620-4a5c-82b9-d2dd4e71ded0
    Task action:     Synchronize
    Task errors:     Connection refused - connect(2), Connection refused - connect(2)
 2) Task identifier: 1a621b64-4e21-468f-a160-fd9cb250dacf
    Task action:     Synchronize
    Task errors:     Connection refused - connect(2), Connection refused - connect(2)
Total tasks failed to resume:            0
Failed tasks:                            

Total tasks skipped:                     0
Skipped tasks:

[root@ibm-x3250m4-07 ~]# hammer -u admin -p changeme task resume
Total tasks found paused in error state: 0
Total tasks resumed:                     0
Resumed tasks:                           

Total tasks failed to resume:            0
Failed tasks:                            

Total tasks skipped:                     0
Skipped tasks:

Comment 14 Corey Welton 2015-07-24 16:58:48 UTC
I also subsequently checked to assure my task was resumed in Tasks UI, which it was.   I think we can consider this verified in Snap 14.

Comment 17 Corey Welton 2015-07-24 17:14:29 UTC
Marking this verified, per consultation with dev.

Comment 18 Pavel Moravec 2015-07-29 11:01:34 UTC
Created KCS 1547743 per #c13 .

Comment 19 Bryan Kearney 2015-08-12 16:02:35 UTC
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.


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