Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.