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:
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.
Closing this BZ in favor of a better interface for tasks cleanup BZ[1]. [1] - https://bugzilla.redhat.com/show_bug.cgi?id=1723751