Bug 1201660
| Summary: | [RFE]: bulk actions on tasks | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
| Component: | Usability | Assignee: | Ivan Necas <inecas> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tazim Kolhar <tkolhar> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0.8 | CC: | bbuckingham, cwelton, inecas, mmccune, pmoravec, sthirugn, tkolhar, tomckay, xdmoon |
| Target Milestone: | Unspecified | Keywords: | FutureFeature, Triaged |
| Target Release: | Unused | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 16:02:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1115190, 1225497 | ||
|
Description
Pavel Moravec
2015-03-13 08:42:30 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. 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. There is nothing in the UI for this, it is in hammer only.
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:
*** Bug 1231220 has been marked as a duplicate of this bug. *** 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:
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. Marking this verified, per consultation with dev. Created KCS 1547743 per #c13 . This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015. |