Bug 1622264 - foreman_tasks:cleanup process, STATES is not working as expected when passing *
Summary: foreman_tasks:cleanup process, STATES is not working as expected when passing *
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.3.2
Hardware: All
OS: All
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: 1619394
TreeView+ depends on / blocked
 
Reported: 2018-08-25 00:15 UTC by Waldirio M Pinheiro
Modified: 2021-12-10 17:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-01 08:09:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1723751 0 high CLOSED [RFE] Provide a script-like interface to task cleanup, preventing wrong values from being entered 2022-07-05 14:28:06 UTC

Description Waldirio M Pinheiro 2018-08-25 00:15:41 UTC
Description of problem:
When executing foreman-rake to remove tasks, by default will be removed only stopped tasks, using * should be expected to delete everything but it's not.

Version-Release number of selected component (if applicable):
6.3.2

How reproducible:
100%

Steps to Reproduce:
1. Foreman-rake console
2. foreman-rake foreman_tasks:cleanup:run TASK_SEARCH="*" AFTER=1h STATES="*" VERBOSE=true NOOP=true
3. foreman-rake foreman_tasks:cleanup:run TASK_SEARCH="*" AFTER=1h STATES="running" VERBOSE=true NOOP=true

Actual results:
* is not working as expected

Expected results:
* should mean all available states *running, paused, stopped, etc*

Additional info:

Comment 3 Adam Ruzicka 2018-09-03 13:13:16 UTC
I'd say it is working exactly as expected. From the description of the task "comma separated list of task states to touch with the cleanup, by default only stopped tasks are covered". That doesn't suggest that asterisk could be used to match all.

Also to me using an asterisk would imply some kind of glob matching and if we went with that we would also have to extend the support for matching "stopped" and "scheduled" with "s*" and so on.

In foreman-tasks >= 0.10.3 the user can use a special keyword "all" to match against all the states.

Comment 6 Adam Ruzicka 2019-08-01 08:09:24 UTC
Closing this BZ in favor of a better interface for tasks cleanup BZ[1].

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1723751


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